chore: add docker-compose.dev.yml and sync with VPS
This commit is contained in:
parent
d038487b4c
commit
aa1a9d0520
1 changed files with 53 additions and 0 deletions
53
docker-compose.dev.yml
Normal file
53
docker-compose.dev.yml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: sim-db-dev
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: '123'
|
||||
POSTGRES_DB: saveinmed
|
||||
ports:
|
||||
- '55432:5432'
|
||||
volumes:
|
||||
- sim-db-dev-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d saveinmed"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
image: cosmtrek/air
|
||||
container_name: sim-backend-dev
|
||||
working_dir: /app
|
||||
ports:
|
||||
- "8522:8522"
|
||||
environment:
|
||||
- DB_URL=postgres://postgres:123@db:5432/saveinmed?sslmode=disable
|
||||
- PORT=8522
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
image: node:22-alpine
|
||||
container_name: sim-frontend-dev
|
||||
working_dir: /app
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=https://sim.rede5.com.br/api
|
||||
- NODE_ENV=development
|
||||
- PORT=3001
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
depends_on:
|
||||
- backend
|
||||
command: sh -c 'npm install --silent && npm run dev'
|
||||
|
||||
volumes:
|
||||
sim-db-dev-data:
|
||||
Loading…
Reference in a new issue