ci: publish Docker images and deploy development environment

This commit is contained in:
2026-08-04 13:58:08 +00:00
parent 4b04bf48e9
commit 95aae8a63a
3 changed files with 150 additions and 13 deletions

View File

@@ -0,0 +1,74 @@
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: tiptop
POSTGRES_PASSWORD: tiptop_dev_password
POSTGRES_DB: the_tip_top_db
volumes:
- tiptop_postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tiptop -d the_tip_top_db"]
interval: 10s
timeout: 5s
retries: 10
networks:
- tiptop-dev
backend:
image: ${REGISTRY}/the-tip-top/backend:${IMAGE_TAG}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
PORT: 5000
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>"
command: >
sh -c "
npx prisma migrate deploy &&
npm run init:db &&
npm start
"
ports:
- "5001:5000"
networks:
- tiptop-dev
frontend:
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
restart: unless-stopped
depends_on:
- backend
ports:
- "5173:80"
networks:
- tiptop-dev
volumes:
tiptop_postgres_dev_data:
name: the-tip-top_tiptop_postgres_dev_data
networks:
tiptop-dev:
name: tiptop-dev