refactor: update project structure
This commit is contained in:
@@ -29,6 +29,35 @@ services:
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
backend-tests:
|
||||
profiles: ["test"]
|
||||
build:
|
||||
context: .
|
||||
target: builder
|
||||
environment:
|
||||
TEST_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
command: ["go", "test", "-race", "-count=1", "-v", "./src/backend/..."]
|
||||
frontend:
|
||||
build:
|
||||
context: ./src/frontend
|
||||
environment:
|
||||
API_PROXY_TARGET: http://api:8080
|
||||
ports:
|
||||
- "127.0.0.1:5173:5173"
|
||||
volumes:
|
||||
- ./src/frontend:/app
|
||||
- /app/node_modules
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:5173/').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user