-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yml
132 lines (126 loc) · 4.19 KB
/
docker-compose.dev.yml
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
services:
holy-grail-backend:
container_name: holy-grail-backend
networks:
- holy-grail-network
build: ./holy-grail-backend/backend
command: uvicorn app.main:app --host 0.0.0.0 --port 8005 --reload
ports:
- "8005:8005"
- "9005:9005"
depends_on:
- holy-grail-db
- holy-grail-scheduler
environment:
FRONTEND_URL: ${FRONTEND_URL}
BACKEND_URL: ${BACKEND_URL}
FRONTEND_CONTAINER_URL: ${FRONTEND_CONTAINER_URL}
BACKEND_CONTAINER_URL: ${BACKEND_CONTAINER_URL}
GOOGLE_APPLICATION_PROPERTY_ID: ${GOOGLE_APPLICATION_PROPERTY_ID}
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS}
CELERY_BROKER_URL: ${REDIS_URL}
CELERY_RESULT_BACKEND: ${REDIS_URL}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
DATABASE_URL: ${DATABASE_URL}
TASK_RUNNER_DATABASE_URL: ${TASK_RUNNER_DATABASE_URL}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES}
ALGORITHM: ${ALGORITHM}
SECRET_KEY: ${SECRET_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
AWS_CLOUDFRONT_URL: ${AWS_CLOUDFRONT_URL}
MAILTRAP_BEARER_TOKEN: ${MAILTRAP_BEARER_TOKEN}
MAILTRAP_API_KEY: ${MAILTRAP_API_KEY}
PRODUCTION: ${PRODUCTION}
volumes:
- ./holy-grail-backend/backend:/app
restart: always
holy-grail-db:
container_name: holy-grail-db
networks:
- holy-grail-network
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
healthcheck:
interval: 5s
retries: 10
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
image: postgres:14.1-alpine
ports:
- '5434:5432'
restart: unless-stopped
volumes:
- ./postgres:/var/lib/postgresql/data
- ./holy-grail-backend/db:/docker-entrypoint-initdb.d/
holy-grail-redis:
image: redis:7.0.7-alpine
networks:
- holy-grail-network
ports:
- "6379"
depends_on:
- holy-grail-db
command: redis-server --loglevel verbose
restart: unless-stopped
holy-grail-scheduler:
networks:
- holy-grail-network
environment:
FRONTEND_URL: ${FRONTEND_URL}
BACKEND_URL: ${BACKEND_URL}
FRONTEND_CONTAINER_URL: ${FRONTEND_CONTAINER_URL}
BACKEND_CONTAINER_URL: ${BACKEND_CONTAINER_URL}
GOOGLE_APPLICATION_PROPERTY_ID: ${GOOGLE_APPLICATION_PROPERTY_ID}
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS}
CELERY_BROKER_URL: ${REDIS_URL}
CELERY_RESULT_BACKEND: ${REDIS_URL}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
DATABASE_URL: ${DATABASE_URL}
TASK_RUNNER_DATABASE_URL: ${TASK_RUNNER_DATABASE_URL}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES}
ALGORITHM: ${ALGORITHM}
SECRET_KEY: ${SECRET_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
AWS_CLOUDFRONT_URL: ${AWS_CLOUDFRONT_URL}
MAILTRAP_BEARER_TOKEN: ${MAILTRAP_BEARER_TOKEN}
MAILTRAP_API_KEY: ${MAILTRAP_API_KEY}
depends_on:
- holy-grail-redis
build:
context: ./holy-grail-backend/backend
command: celery -A app.utils.worker worker -B --loglevel=info
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "celery inspect ping" ]
volumes:
- ./holy-grail-backend/backend:/app
holy-grail-scheduler-gui:
networks:
- holy-grail-network
environment:
CELERY_BROKER_URL: ${REDIS_URL}
links:
- holy-grail-scheduler
ports:
- "5555:5555"
depends_on:
holy-grail-scheduler:
condition: service_healthy
image: mher/flower:1.2.0
restart: unless-stopped
networks:
holy-grail-network:
name: holy-grail-network
driver: bridge