-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelopment.yml
181 lines (170 loc) · 4.25 KB
/
development.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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
version: "3.9"
services:
client:
image: onroadclient:dev
container_name: or_client_dev
build:
context: ./client
dockerfile: Dockerfile.client.dev
restart: unless-stopped
volumes:
- ./client:/app
- /app/node_modules/
environment:
SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN}
VITE_API_DOMAIN: ${DOMAIN_NAME}
VITE_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
depends_on:
- django
- hasura
- caddy
networks:
- caddy_network
django:
image: onroadapi:dev
container_name: or_django_dev
build:
dockerfile: ./Dockerfile.api.dev
restart: unless-stopped
volumes:
- ./caddy/static:/app/static
- .:/app
env_file:
- ./.env
environment:
- POSTGRES_HOST=db
depends_on:
- db
- caddy
networks:
- postgres_network
- caddy_network
- rabbitmq_network
- redis_network
worker:
image: onroadapi:dev
container_name: or_worker_dev
build:
dockerfile: ./Dockerfile.api.dev
command: python manage.py rundramatiq
restart: unless-stopped
volumes:
- .:/app
env_file:
- ./.env
environment:
- POSTGRES_HOST=db
depends_on:
- db
- rabbitmq
networks:
- rabbitmq_network
- postgres_network
- caddy_network
caddy:
restart: always
image: onroadcaddy:dev
build:
context: ./caddy
dockerfile: Dockerfile.caddy
volumes:
- caddy_data:/data
- caddy_config:/config
- ./caddy/cert.crt:/etc/pki/tls/certs/cert.crt
- ./caddy/cert.key:/etc/pki/tls/private/cert.key
environment:
- DOMAIN_NAME=${DOMAIN_NAME}
- TLS=${TLS}
- TLS_KEY=${TLS_KEY}
- RATE_LIMIT=${RATE_LIMIT}
container_name: or_caddy_dev
ports:
- "80:80"
- "443:443"
networks:
- caddy_network
db:
image: postgres:16
container_name: or_database
volumes:
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
networks:
- postgres_network
rabbitmq:
image: rabbitmq:3-management
container_name: or_rabbitmq
restart: always
volumes:
- rabbitmq:/var/lib/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_DEFAULT_VHOST}
networks:
- rabbitmq_network
- caddy_network
hasura:
image: onroadhasura:dev
build:
context: ./hasura
dockerfile: Dockerfile.hasura
restart: unless-stopped
volumes:
- ./hasura/migrations:/hasura-migrations
- ./hasura/metadata:/hasura-metadata
depends_on:
- "db"
- "django"
- "caddy"
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"${JWT_SECRET_KEY}","claims_namespace":"user_claims","claims_format":"json"}'
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: "anonymous"
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 120
HASURA_GRAPHQL_CORS_DOMAIN: "*"
API_HOST: "http://django:9000"
networks:
- postgres_network
- caddy_network
redis:
image: redis:7-alpine
container_name: or_redis
restart: unless-stopped
volumes:
- redis:/data
networks:
- redis_network
redis-commander:
image: rediscommander/redis-commander:latest
container_name: or_redis_commander
restart: unless-stopped
environment:
REDIS_HOSTS: "redis"
HTTP_USER: ${REDIS_COMMANDER_USER}
HTTP_PASSWORD: ${REDIS_COMMANDER_PASSWORD}
networks:
- caddy_network
- redis_network
networks:
caddy_network:
driver: bridge
redis_network:
driver: bridge
postgres_network:
driver: bridge
rabbitmq_network:
driver: bridge
volumes:
postgres:
rabbitmq:
caddy_data:
caddy_config:
redis: