feat: deploy with traefik
This commit is contained in:
parent
1fc1cf1c83
commit
2c8c1eacdf
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user