-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yml
72 lines (62 loc) · 1.7 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
# Development docker compose.
version: "3"
services:
# Make sure that production db is working. Other wise, uncomment these lines.
# db:
# container_name: ${CONTAINER_DB}
# image: postgres
# restart: unless-stopped
# environment:
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# volumes:
# - sklec_vis_db:/var/lib/postgresql/data
# ports:
# - "5432:5432"
server:
container_name: ${CONTAINER_SERVER}
build:
context: ./server
dockerfile: Dockerfile
command: docker/django-start-dev.sh
environment:
DJANGO_SETTINGS_MODULE: sklecvis.settings
DB_HOST: 172.20.5.126 # For local debugging
DB_PORT: 5432
DB_USERNAME: postgres
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: sklecvis
PYTHONPATH: /app
expose:
- "8000"
volumes:
- ./server:/app
# 如果使用生产环境 media:
- /srv/sklec-vis/server/media:/app/media
# 监听文件夹
- /home/public/sklecvis-autoupload:/data/autoupload
client:
container_name: ${CONTAINER_CLIENT}
build:
context: ./client
dockerfile: Dockerfile-dev
volumes:
- ./client/src:/app/src
- ./client/public:/app/public
nginx:
container_name: ${CONTAINER_NGINX}
build:
context: ./nginx
dockerfile: Dockerfile-dev
ports:
- "${DEV_PORT}:80"
volumes:
- ./server/static/:/srv/server_static
# 如果使用开发自己 media:
# - ./server/media/:/srv/server_media
# 如果使用生产环境 media:
- /srv/sklec-vis/server/media:/srv/server_media # media file of production environment.
depends_on:
- server
- client
volumes:
sklec_vis_db: {}