-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (38 loc) · 926 Bytes
/
docker-compose.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
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
ENVIRONMENT: ${ENVIRONMENT:-development}
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379/0
volumes:
- '.:/opt/app'
command: ["uvicorn", "app.main:app", "--reload", "--host", "0.0.0.0", "--port", "8080"]
ports:
- '8080:8080'
worker:
build:
context: .
dockerfile: Dockerfile
args:
ENVIRONMENT: ${ENVIRONMENT:-development}
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379/0
volumes:
- '.:/opt/app'
command: ["sh", "-c", "rq worker --url $${REDIS_URL}"]
redis:
image: 'redis:6'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'