-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
165 lines (157 loc) · 4.77 KB
/
docker-compose-dev.yml
File metadata and controls
165 lines (157 loc) · 4.77 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
services:
frontend:
container_name: frontend_${APP_ENV:-dev}
environment:
VITE_APP_ENV: ${APP_ENV:-dev}
build:
context: .
dockerfile: Dockerfile-dev
target: client
ports:
- "127.0.0.1:${FRONTEND_PORT:-3000}:3000"
develop:
watch:
- action: sync
path: ./client
target: /app
ignore:
- node_modules/
- dist/
- action: rebuild
path: package.json
depends_on:
- backend
backend:
container_name: backend_${APP_ENV:-dev}
build:
context: .
dockerfile: Dockerfile-dev
target: server
ports: ["127.0.0.1:5678:5678"]
environment:
PYTHONPATH: /app
DEBUG: ${DEBUG:-false}
APP_ENV: ${APP_ENV:-dev}
SECRET_KEY: yoursecretkey
DB_URL: "postgresql+asyncpg://your_username:your_password@postgres_${APP_ENV:-dev}:5432/your_database_${APP_ENV:-dev}"
CELERY_BROKER_URL: redis://redis_${APP_ENV:-dev}:6379/0
REDIS_URL: redis://redis_${APP_ENV:-dev}:6379/0
MINIO_ENDPOINT: minio${APP_ENV:-dev}:9000
MINIO_ROOT_USER: your_username
MINIO_ROOT_PASSWORD: minio-secret-key
RUN_MIGRATIONS: ${RUN_MIGRATIONS:-true}
volumes:
- ./server/migrations:/app/migrations
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/health"]
interval: 10s
timeout: 20s
retries: 3
develop:
watch:
- action: sync+restart
path: ./server
target: /app
ignore:
- ./migrations/
- ./server/migrations/
- ./.venv/
- ./server/.venv/
- ./client
- action: rebuild
path: server/pyproject.toml
depends_on:
- postgres
- minio
- redis
- celery
postgres:
image: postgres:alpine@sha256:fbe21607052bb5c298674f2fd8cf044a63aa3ddf50b81627f894f91f40f50bcb
container_name: postgres_${APP_ENV:-dev}
environment:
POSTGRES_USER: your_username
POSTGRES_PASSWORD: your_password
POSTGRES_DB: your_database_dev
ports:
- 127.0.0.1:5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres-init-scripts:/docker-entrypoint-initdb.d
adminer:
container_name: adminer_${APP_ENV:-dev}
image: adminer:5.3.0@sha256:6bc678e77abcd8c7f34133f4903a4be485ec38b17df3d40a845ee56af0fcb32a
restart: always
ports:
- 127.0.0.1:${ADMINER_PORT:-8080}:8080
minio:
image: minio/minio:latest@sha256:064117214caceaa8d8a90ef7caa58f2b2aeb316b5156afe9ee8da5b4d83e12c8
container_name: minio${APP_ENV:-dev}
environment:
MINIO_ROOT_USER: your_username
MINIO_ROOT_PASSWORD: minio-secret-key
command: server /data --console-address ":9001"
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 10s
retries: 2
redis:
image: redis:7.4.5-alpine@sha256:0c0142c3cd69bc030ea09fecfa1c1c0c7d0e7d6081be6bb4957804f23d2cf57a
container_name: redis_${APP_ENV:-dev}
privileged: true
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
celery:
container_name: celery_${APP_ENV:-dev}
build:
context: .
dockerfile: Dockerfile-dev
target: celery
ports: ["127.0.0.1:5679:5679"]
environment:
PYTHONPATH: /app
DEBUG: ${DEBUg:-false}
APP_ENV: ${APP_ENV:-dev}
SECRET_KEY: yoursecretkey
DB_URL: "postgresql+asyncpg://your_username:your_password@postgres_${APP_ENV:-dev}:5432/your_database_${APP_ENV:-dev}"
CELERY_BROKER_URL: redis://redis_${APP_ENV:-dev}:6379/0
REDIS_URL: redis://redis_${APP_ENV:-dev}:6379/0
MINIO_ENDPOINT: minio${APP_ENV:-dev}:9000
MINIO_ROOT_USER: your_username
MINIO_ROOT_PASSWORD: minio-secret-key
depends_on:
- redis
flower:
container_name: flower_${APP_ENV:-dev}
build:
context: .
dockerfile: Dockerfile-dev
target: server
command: uv run celery -A src.worker flower --port=5555
environment:
PYTHONPATH: /app
APP_ENV: ${APP_ENV:-dev}
SECRET_KEY: yoursecretkey
DB_URL: "postgresql+asyncpg://your_username:your_password@postgres_${APP_ENV:-dev}:5432/your_database_${APP_ENV:-dev}"
CELERY_BROKER_URL: redis://redis_${APP_ENV:-dev}:6379/0
REDIS_URL: redis://redis_${APP_ENV:-dev}:6379/0
MINIO_ENDPOINT: minio${APP_ENV:-dev}:9000
MINIO_ROOT_USER: your_username
MINIO_ROOT_PASSWORD: minio-secret-key
RUN_MIGRATIONS: false
ports:
- 127.0.0.1:${FLOWER_PORT:-5555}:5555
depends_on:
- redis
- celery
volumes:
postgres_data:
minio_data:
redis_data: