/
docker-compose.yml
62 lines (56 loc) · 1.26 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '3'
services:
database:
image: postgres:13
environment:
POSTGRES_USER: amy
POSTGRES_PASSWORD: amypostgresql
POSTGRES_DB: amy
ports:
- "5432:5432"
# volumes:
# - ../docker/database:/var/lib/postgresql/data
redis:
command: redis-server --appendonly yes
image: redis:latest
ports:
- "6379:6379"
# volumes:
# - ../docker/redis:/data
amy:
# building with docker-compose didn't work on my machine,
# so perhaps it's better to build with Docker itself
build:
context: .
dockerfile: Dockerfile
image: amy:latest
environment:
- AMY_REDIS_URL=redis://redis:6379/
- AMY_DATABASE_URL=postgres://amy:amypostgresql@postgres:5432/amy
# volumes:
# - .:/amy
ports:
- "8000:80"
depends_on:
- database
- redis
rqworker:
image: amy:latest
environment:
- AMY_REDIS_URL=redis://redis:6379/
command: python manage.py rqworker -v 2
depends_on:
- redis
- amy
rqscheduler:
image: amy:latest
environment:
- AMY_REDIS_URL=redis://redis:6379/
command: python manage.py rqscheduler -v 2
depends_on:
- redis
- amy
- rqworker
networks:
default:
name: amy_network