ci: traefik deploy
This commit is contained in:
parent
e74f910d03
commit
fdcb1ccf98
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -1,14 +1,11 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
PATH = "/var/lib/jenkins/bin:/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:${env.PATH}"
|
||||
}
|
||||
stages {
|
||||
stage('Install deps') {
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
reuseNode true
|
||||
image 'node:22'
|
||||
image 'node:22-alpine'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
@ -25,6 +22,8 @@ pipeline {
|
||||
// extract the tiles
|
||||
sh "if [ ! -d /var/www/dev.araozu.combi/tiles ]; then \n tar -xf tiles.tar.gz -C /var/www/dev.araozu.combi \n fi"
|
||||
sh 'cp -r ./dist/* /var/www/dev.araozu.combi/'
|
||||
sh 'docker-compose down || true'
|
||||
sh 'docker-compose up -d'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
24
docker-compose.yml
Normal file
24
docker-compose.yml
Normal file
@ -0,0 +1,24 @@
|
||||
services:
|
||||
dev_araozu_combi:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
container_name: dev_araozu_combi
|
||||
volumes:
|
||||
- /var/www/dev.araozu_combi/:/usr/share/nginx/html
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.dev_araozu_combi.rule=Host(`combi.araozu.dev`)"
|
||||
- "traefik.http.routers.dev_araozu_combi.entrypoints=websecure"
|
||||
- "traefik.http.routers.dev_araozu_combi.tls=true"
|
||||
- "traefik.http.routers.dev_araozu_combi.tls.certresolver=hetzner-resolver"
|
||||
- "traefik.http.routers.dev_araozu_combi.tls.domains[0].main=araozu.dev"
|
||||
- "traefik.http.routers.dev_araozu_combi.tls.domains[0].sans=*.araozu.dev"
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: proxy
|
||||
external: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user