diff --git a/Jenkinsfile b/Jenkinsfile index a37706b..0160f82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' } } } diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..eef1df4 --- /dev/null +++ b/docker-compose.yml @@ -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 +