-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
79 lines (67 loc) · 1.69 KB
/
docker-compose.dev.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
###############################################################################
# In settings.py:
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'HOST': 'mysql',
# { ...
# }
# }
#
# In PyCharm configurations:
# Host: 0.0.0.0 - Port: 8000
# Python interpreter: Select the docker ...
###############################################################################
version: "3.1"
services:
web:
build:
context: .
dockerfile: Dockerfile.dev
container_name: ${PROJECT_NAME}-django
restart: on-failure
env_file:
- .env
environment:
- DJANGO_DEV=development
volumes:
- ./app:/app
- static_volume:/app/staticfiles
- ./app/node_modules:/app/node_modules
ports:
- 9000:9000
depends_on:
- db
- redis
db:
restart: always
image: postgres
container_name: ${PROJECT_NAME}-postgres
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=teamwork_db
- POSTGRES_PORT=5432
volumes:
- postgres_data:/var/lib/postgresql/data/
pgadmin:
image: dpage/pgadmin4
container_name: ${PROJECT_NAME}-pgadmin
depends_on:
- db
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
restart: always
redis:
image: redis:latest
container_name: ${PROJECT_NAME}-redis
ports:
- 6379:6379
volumes:
postgres_data:
static:
static_volume:
node_modules: