+4
-41
@@ -1,8 +1,7 @@
|
||||
version: '3.8'
|
||||
|
||||
# The database for local development: `docker compose up -d`, then see docs/local-development.md.
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_DB: kooltap
|
||||
POSTGRES_USER: kooltap
|
||||
@@ -11,49 +10,13 @@ services:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
# Creates kooltap_test for the end-to-end tests
|
||||
- ./scripts/create-test-database.sql:/docker-entrypoint-initdb.d/create-test-database.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U kooltap"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- kooltap-net
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: api
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://kooltap:kooltap@postgres:5432/kooltap
|
||||
- JWT_SECRET=dev-jwt-secret-change-in-production
|
||||
- PORT=3001
|
||||
- CORS_ORIGIN=http://localhost:3000
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- kooltap-net
|
||||
|
||||
dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: dashboard
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=http://localhost:3001/api/v1
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
- kooltap-net
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
kooltap-net:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user