ci: migrate deployments to VPS HTTPS infrastructure
Some checks failed
THE-TIP-TOP-MULTIBRANCH/pipeline/head There was a failure building this commit

This commit is contained in:
2026-08-14 22:45:59 +00:00
parent b15d8458c8
commit 2bbd2d16e4
4 changed files with 116 additions and 75 deletions

View File

@@ -9,7 +9,7 @@ services:
POSTGRES_DB: the_tip_top_db
volumes:
- tiptop_postgres_dev_data:/var/lib/postgresql/data
- tiptop_dev_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tiptop -d the_tip_top_db"]
@@ -30,14 +30,10 @@ services:
environment:
PORT: 5000
NODE_ENV: development
DATABASE_URL: postgresql://tiptop:tiptop_dev_password@postgres:5432/the_tip_top_db
JWT_SECRET: dev_secret_change_me
APP_URL: http://192.168.1.23:5001
MAIL_HOST: smtp.gmail.com
MAIL_PORT: 587
MAIL_USER: ""
MAIL_PASS: ""
MAIL_FROM: "The Tip Top <no-reply@tiptop.local>"
APP_URL: https://api-dev.dsp5-archi-o24a-4-5-g4.fr
command: >
sh -c "
@@ -46,11 +42,18 @@ services:
npm start
"
ports:
- "5001:5000"
networks:
- tiptop-dev
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-dev-api.rule=Host(`api-dev.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-dev-api.entrypoints=websecure"
- "traefik.http.routers.tiptop-dev-api.tls=true"
- "traefik.http.routers.tiptop-dev-api.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-dev-api.loadbalancer.server.port=5000"
frontend:
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
@@ -59,17 +62,26 @@ services:
depends_on:
- backend
ports:
- "5173:80"
networks:
- tiptop-dev
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-dev.rule=Host(`dev.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-dev.entrypoints=websecure"
- "traefik.http.routers.tiptop-dev.tls=true"
- "traefik.http.routers.tiptop-dev.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-dev.loadbalancer.server.port=80"
volumes:
tiptop_postgres_dev_data:
external: true
name: the-tip-top_tiptop_postgres_dev_data
tiptop_dev_postgres_data:
name: tiptop_dev_postgres_data
networks:
tiptop-dev:
name: tiptop-dev
proxy:
external: true

View File

@@ -12,11 +12,7 @@ services:
- tiptop_preprod_postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U tiptop_preprod -d the_tip_top_preprod"
]
test: ["CMD-SHELL", "pg_isready -U tiptop_preprod -d the_tip_top_preprod"]
interval: 10s
timeout: 5s
retries: 10
@@ -37,12 +33,7 @@ services:
NODE_ENV: preproduction
DATABASE_URL: postgresql://tiptop_preprod:tiptop_preprod_password@postgres:5432/the_tip_top_preprod
JWT_SECRET: preprod_secret_change_me
APP_URL: http://192.168.1.23:5002
MAIL_HOST: smtp.gmail.com
MAIL_PORT: 587
MAIL_USER: ""
MAIL_PASS: ""
MAIL_FROM: "The Tip Top Preprod <no-reply@tiptop.local>"
APP_URL: https://api-preprod.dsp5-archi-o24a-4-5-g4.fr
command: >
sh -c "
@@ -51,11 +42,18 @@ services:
npm start
"
ports:
- "5002:5000"
networks:
- tiptop-preprod
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-preprod-api.rule=Host(`api-preprod.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-preprod-api.entrypoints=websecure"
- "traefik.http.routers.tiptop-preprod-api.tls=true"
- "traefik.http.routers.tiptop-preprod-api.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-preprod-api.loadbalancer.server.port=5000"
frontend:
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
@@ -64,11 +62,18 @@ services:
depends_on:
- backend
ports:
- "5174:80"
networks:
- tiptop-preprod
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-preprod.rule=Host(`preprod.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-preprod.entrypoints=websecure"
- "traefik.http.routers.tiptop-preprod.tls=true"
- "traefik.http.routers.tiptop-preprod.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-preprod.loadbalancer.server.port=80"
volumes:
tiptop_preprod_postgres_data:
@@ -77,3 +82,6 @@ volumes:
networks:
tiptop-preprod:
name: tiptop-preprod
proxy:
external: true

View File

@@ -12,11 +12,7 @@ services:
- tiptop_prod_postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U tiptop_prod -d the_tip_top_prod"
]
test: ["CMD-SHELL", "pg_isready -U tiptop_prod -d the_tip_top_prod"]
interval: 10s
timeout: 5s
retries: 10
@@ -37,13 +33,7 @@ services:
NODE_ENV: production
DATABASE_URL: postgresql://tiptop_prod:tiptop_prod_password@postgres:5432/the_tip_top_prod
JWT_SECRET: prod_secret_change_me
APP_URL: http://192.168.1.23:5003
MAIL_HOST: smtp.gmail.com
MAIL_PORT: 587
MAIL_USER: ""
MAIL_PASS: ""
MAIL_FROM: "The Tip Top <no-reply@tiptop.local>"
APP_URL: https://api.dsp5-archi-o24a-4-5-g4.fr
command: >
sh -c "
@@ -52,11 +42,18 @@ services:
npm start
"
ports:
- "5003:5000"
networks:
- tiptop-prod
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-prod-api.rule=Host(`api.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-prod-api.entrypoints=websecure"
- "traefik.http.routers.tiptop-prod-api.tls=true"
- "traefik.http.routers.tiptop-prod-api.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-prod-api.loadbalancer.server.port=5000"
frontend:
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
@@ -65,11 +62,18 @@ services:
depends_on:
- backend
ports:
- "5175:80"
networks:
- tiptop-prod
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.tiptop-prod.rule=Host(`dsp5-archi-o24a-4-5-g4.fr`) || Host(`www.dsp5-archi-o24a-4-5-g4.fr`)"
- "traefik.http.routers.tiptop-prod.entrypoints=websecure"
- "traefik.http.routers.tiptop-prod.tls=true"
- "traefik.http.routers.tiptop-prod.tls.certresolver=letsencrypt"
- "traefik.http.services.tiptop-prod.loadbalancer.server.port=80"
volumes:
tiptop_prod_postgres_data:
@@ -78,3 +82,6 @@ volumes:
networks:
tiptop-prod:
name: tiptop-prod
proxy:
external: true