-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.65 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: posting_app
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/migrations:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
environment:
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=password
- DB_NAME=posting_app
- DB_SSLMODE=disable
- JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
- JWT_ACCESS_DURATION=15m
- JWT_REFRESH_DURATION=720h
- STRIPE_API_KEY=sk_test_your_stripe_secret_key_here
- STRIPE_PRICE_ID=price_your_stripe_price_id_here
- STRIPE_WEBHOOK_SECRET=whsec_your_stripe_webhook_secret_here
- STRIPE_MOCK_MODE=true
- BASE_URL=http://localhost:3000
- PORT=8080
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
# - ./backend:/app # Commenting out to avoid overriding built binary
- backend_uploads:/app/uploads
restart: unless-stopped
frontend:
build:
context: ./front
dockerfile: Dockerfile
environment:
- REACT_APP_API_URL=http://backend:8080
ports:
- "3000:3000"
depends_on:
- backend
volumes:
- ./front:/app
- /app/node_modules
restart: unless-stopped
volumes:
postgres_data:
backend_uploads: