feat: add docker for deployment with traefik

This commit is contained in:
Araozu 2024-11-20 19:44:49 -05:00
parent 33e51cd5cc
commit 2b762239a9
2 changed files with 25 additions and 0 deletions

2
Jenkinsfile vendored
View File

@ -24,6 +24,8 @@ pipeline {
steps {
sh 'rm -rf /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
View 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