-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 2.24 KB
/
docker-compose.yml
File metadata and controls
88 lines (82 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: sickfits-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-sickfits}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- sickfits-network
# GraphQL Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: development
container_name: sickfits-backend
environment:
NODE_ENV: development
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-sickfits}?schema=public
PRISMA_ENDPOINT: ${PRISMA_ENDPOINT:-}
PRISMA_SECRET: ${PRISMA_SECRET:-}
JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-token-change-in-production}
FRONTEND_URL: http://localhost:3000
STRIPE_SECRET: ${STRIPE_SECRET:-}
MAIL_HOST: ${MAIL_HOST:-}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USER: ${MAIL_USER:-}
MAIL_PASS: ${MAIL_PASS:-}
ports:
- "${BACKEND_PORT:-4000}:4000"
volumes:
- ./backend:/app
- /app/node_modules
- /app/.next
depends_on:
postgres:
condition: service_healthy
command: npm run dev
networks:
- sickfits-network
restart: unless-stopped
# Next.js Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: development
container_name: sickfits-frontend
environment:
NODE_ENV: development
NEXT_PUBLIC_GRAPHQL_ENDPOINT: http://localhost:4000/graphql
NEXT_PUBLIC_STRIPE_KEY: ${NEXT_PUBLIC_STRIPE_KEY:-}
ports:
- "${FRONTEND_PORT:-3000}:3000"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
command: npm run dev
networks:
- sickfits-network
restart: unless-stopped
volumes:
postgres_data:
driver: local
networks:
sickfits-network:
driver: bridge