feat: add docker for deployment with traefik
This commit is contained in:
parent
33e51cd5cc
commit
2b762239a9
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -24,6 +24,8 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh 'rm -rf /var/www/thp-lang.org/*'
|
sh 'rm -rf /var/www/thp-lang.org/*'
|
||||||
sh 'mv -f dist/* /var/www/thp-lang.org/'
|
sh 'mv -f dist/* /var/www/thp-lang.org/'
|
||||||
|
sh 'docker-compose down || true'
|
||||||
|
sh 'docker-compose up -d'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
thp:
|
||||||
|
image: nginx:alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: thp-lang
|
||||||
|
volumes:
|
||||||
|
- /var/www/thp-lang.org/:/usr/share/nginx/html
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.thp.rule=Host(`thp-lang.org`)"
|
||||||
|
- "traefik.http.routers.thp.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.thp.tls=true"
|
||||||
|
- "traefik.http.routers.thp.tls.certresolver=hetzner-resolver"
|
||||||
|
- "traefik.http.routers.thp.tls.domains[0].main=thp-lang.org"
|
||||||
|
- "traefik.http.routers.thp.tls.domains[0].sans=*.thp-lang.org"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
name: proxy
|
||||||
|
external: true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user