-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
103 lines (93 loc) · 2.15 KB
/
docker-compose.dev.yml
File metadata and controls
103 lines (93 loc) · 2.15 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
x-app-base: &app-base
build:
context: .
env_file:
- .env
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
networks:
- dev-app-network
x-app-env: &app-env
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres
DB_SHOULD_MIGRATE: "true"
SESSION_TOKEN_SECRET_KEY: secret_key
SESSION_TOKEN_DURATION: 24h
BREVO_API_KEY: ${BREVO_API_KEY}
EMAIL_SENDER_ADDRESS: ${EMAIL_SENDER_ADDRESS}
SERVER_ADMIN_EMAIL: "admin@admin.admin"
SERVER_ADMIN_PASSWORD: admin123
STRIPE_API_KEY: ${STRIPE_API_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
x-stripe-base: &stripe-base
image: stripe/stripe-cli:latest
environment:
STRIPE_API_KEY: ${STRIPE_API_KEY}
STRIPE_DEVICE_NAME: ${STRIPE_DEVICE_NAME}
networks:
- dev-app-network
services:
app-dev:
<<: *app-base
profiles: ["dev"]
environment:
<<: *app-env
build:
context: .
target: dev
tty: true
volumes:
- .:/usr/src/app
app-prod:
<<: *app-base
profiles: ["prod"]
environment:
<<: *app-env
SERVER_ENVIRONMENT: development
build:
context: .
target: prod
volumes:
- ./local_buckets:/usr/src/app/local_buckets
db:
image: postgres:17-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
networks:
- dev-app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
buckets:
image: python:3.12-alpine
command: python -m http.server 8000
working_dir: /buckets
ports:
- "8081:8000"
networks:
- dev-app-network
volumes:
- ./local_buckets:/buckets
stripe-webhook-dev:
<<: *stripe-base
profiles: ["dev"]
command: listen --forward-to app-dev:8000/payments/webhook/stripe
stripe-webhook-prod:
<<: *stripe-base
profiles: ["prod"]
command: listen --forward-to app-prod:8000/payments/webhook/stripe
networks:
dev-app-network:
driver: bridge
volumes:
db-data: