-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.yml
92 lines (84 loc) · 1.95 KB
/
local.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
version: '3.7'
volumes:
postgres: {}
redis: {}
captcha: {}
static: {}
services:
postgres:
image: mysite/postgres:9.6-alpine
build:
context: .
dockerfile: ./compose/local/postgres/Dockerfile
env_file:
- ./.envs/.local/.postgres
volumes:
- ./postgresql:/var/lib/postgresql
networks:
- blog-net
ports:
- "127.0.0.1:55432:5432"
redis:
image: redis:4.0-alpine
volumes:
- ./redis:/data
networks:
- blog-net
ports:
- "127.0.0.1:6369:6379"
mailhog:
image: mailhog/mailhog
networks:
- blog-net
ports:
- "127.0.0.1:8025:8025"
- "127.0.0.1:1025:1025"
backend:
image: mysite/backend
build:
context: .
dockerfile: ./compose/local/backend/Dockerfile # the file contains the steps of build images
entrypoint: /entrypoint
command: /start # The command runs in the container
volumes:
- ./backend:/backend
- ./var:/backend/var
- ./run:/backend/run
- ./data:/backend/data
- ./captcha:/backend/captcha
- ./static:/backend/static
- ./markdown:/backend/apps/article/management/markdown
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
networks:
- blog-net
ports:
- "127.0.0.1:8000:8000" # web service port
- "127.0.0.1:5555:5555" # flower service port
depends_on:
- postgres
- redis
- mailhog
frontend:
image: mysite/frontend
build:
context: .
dockerfile: ./compose/local/frontend/Dockerfile
entrypoint: /entrypoint
command: /start
volumes:
- ./frontend:/frontend
# https://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
- /frontend/node_modules
env_file:
- ./.envs/.local/.frontend
networks:
- blog-net
ports:
- "127.0.0.1:3000:3000"
depends_on:
- backend
networks:
blog-net:
driver: bridge