regroup backend and frontend in app folder
This commit is contained in:
48
app/docker-compose.yml
Normal file
48
app/docker-compose.yml
Normal file
@ -0,0 +1,48 @@
|
||||
services:
|
||||
migrate:
|
||||
image: migrate/migrate
|
||||
volumes:
|
||||
- ./backend/migrations:/migrations
|
||||
networks:
|
||||
- app-net
|
||||
command: -path=/migrations/ -database "postgres://admin:admin@db:5432/monitoring?sslmode=disable" up
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
app:
|
||||
build: .
|
||||
container_name: sm-app
|
||||
ports:
|
||||
- "8082:80"
|
||||
networks:
|
||||
- app-net
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: db
|
||||
environment:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_DB: monitoring
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- app-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U admin -d monitoring"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
app-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
node-data:
|
||||
Reference in New Issue
Block a user