-
Notifications
You must be signed in to change notification settings - Fork 60
/
docker-compose.yml
99 lines (86 loc) · 2.24 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
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
# Docker Compose Local Development Setup
#
# This starts a local multi-container development environment
# with Postgres, Redis, Celery, and Django.
# The configuration comes from .envs/local
#
# To run:
# $ make dockerbuild
# $ make dockerserve
version: '3'
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
local_metabase_data: {}
services:
django: &django
build:
context: .
dockerfile: ./docker-compose/django/Dockerfile
image: ethicaladserver_local_django
depends_on:
- postgres
volumes:
- .:/app
# Make it so we can edit the start script dynamically,
# for example to install dependencies
- ./docker-compose/django/start:/start
# Load the ethicalads_ext code from the host, so we don't have to rebuild
- ${PWD}/${EA_EXT_PATH:-../ethicalads-ext}:/ethicalads-ext
env_file:
- ./.envs/local/django
- ./.envs/local/postgres
ports:
- "${ETHICALADS_DJANGO_PORT:-5000}:5000"
command: /start
# Allow us to run `docker attach` and get
# control on STDIN and be able to debug our code with interactive pdb
stdin_open: true
tty: true
postgres:
build:
context: .
dockerfile: ./docker-compose/postgres/Dockerfile
image: ethicaladserver_production_postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data
- local_postgres_data_backups:/backups
env_file:
- ./.envs/local/postgres
redis:
image: redis:5.0
celeryworker:
<<: *django
image: ethicaladserver_local_celeryworker
depends_on:
- redis
- postgres
env_file:
- ./.envs/local/django
- ./.envs/local/postgres
ports: []
command: /start-celeryworker
celerybeat:
<<: *django
image: ethicaladserver_local_celerybeat
depends_on:
- redis
- postgres
env_file:
- ./.envs/local/postgres
- ./.envs/local/django
ports: []
command: /start-celerybeat
frontend:
build:
context: .
dockerfile: ./docker-compose/frontend/Dockerfile
ports: []
volumes:
- .:/app
# metabase:
# image: metabase/metabase
# ports:
# - ${ETHICALADS_METABASE_PORT:-3000}:3000
# volumes:
# - local_metabase_data:/metabase-data