diff --git a/Jenkinsfile b/Jenkinsfile index d722feb..d440842 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,22 +1,20 @@ pipeline { agent { - docker { + docker { image 'node:22' } } - stages { - stage('Install pnpm') { + stages { + stage("Build") { + agent { + docker { + image 'node:22-alpine' + reuseNode true + } + } steps { sh 'npm i -g pnpm' - } - } - stage('Install dependencies') { - steps { sh 'pnpm i' - } - } - stage('Buid') { - steps { sh 'pnpm build' } } @@ -24,6 +22,8 @@ agent { steps { sh 'rm -rf /var/www/dev.araozu/*' sh 'mv -f dist/* /var/www/dev.araozu/' + 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..54d0bfa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +services: + araozu_dev: + image: nginx:alpine + restart: unless-stopped + container_name: thp-lang + volumes: + - /var/www/dev.araozu/:/usr/share/nginx/html + labels: + - "traefik.enable=true" + - "traefik.http.routers.thp.rule=Host(`araozu.dev`)" + - "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=araozu.dev" + - "traefik.http.routers.thp.tls.domains[0].sans=*.araozu.dev" + networks: + - proxy + +networks: + proxy: + name: proxy + external: true +