forked from hoelsner/product-database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose_dev.yaml
77 lines (71 loc) · 2.06 KB
/
docker-compose_dev.yaml
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
#
# compose file to stage the development services locally
#
version: '3'
services:
redis:
container_name: productdb_dev_redis
image: redis:6
command: /bin/sh -c "redis-server --requirepass PlsChgMe"
volumes:
- productdb_dev_redis_data:/data
networks:
internal:
aliases:
- redis
ports:
- "127.0.0.1:6379:6379"
database:
container_name: productdb_dev_database
image: postgres:12.3
environment:
POSTGRES_DB: productdb
POSTGRES_PASSWORD: postgres
networks:
internal:
aliases:
- database
volumes:
- productdb_dev_pg_data:/var/lib/postgresql/data
- productdb_dev_pd_backup:/backups
ports:
- "127.0.0.1:5432:5432"
web:
container_name: productdb_dev_web
image: "${DOCKER_REGISTRY:-localhost.localdomain}/productdb/django:dev"
command: "watchmedo auto-restart --directory=/var/www/productdb/source --pattern=*.py --recursive -- python3 manage.py runserver 0.0.0.0:8000"
build:
context: .
dockerfile: deploy/docker/Dockerfile-dev
environment:
DEBUG: "1"
PDB_DATABASE_HOST: "database"
PDB_REDIS_HOST: "redis"
volumes:
- "./:/var/www/productdb/source"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- internal
ports:
- "127.0.0.1:8000:8000"
worker:
container_name: productdb_dev_worker
image: "${DOCKER_REGISTRY:-localhost.localdomain}/productdb/django:dev"
command: "watchmedo auto-restart --directory=/var/www/productdb/source --pattern=*.py --recursive -- celery -A django_project worker -l debug --concurrency 1 --events --beat --statedb=/var/www/productdb/data/celerybeat-schedule.db"
build:
context: .
dockerfile: deploy/docker/Dockerfile-dev
environment:
DEBUG: "1"
PDB_DATABASE_HOST: "database"
PDB_REDIS_HOST: "redis"
networks:
- internal
volumes:
- "./:/var/www/productdb/source"
networks:
internal:
volumes:
productdb_dev_pg_data:
productdb_dev_pd_backup:
productdb_dev_redis_data: