-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
135 lines (124 loc) · 3.04 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3.7'
services:
api:
ports:
- 8000:8000
build:
context: ./stroylux
dockerfile: ./Dockerfile
args:
STATIC_URL: '/static/'
restart: unless-stopped
depends_on:
- redis
- pgbouncer
# - elasticsearch
volumes:
- static_volume:/app/static
- ./stroylux/main/:/app/main:Z
- ./stroylux/templates/:/app/templates:Z
- /app/main/static/assets
- ./stroylux/media/:/app/media:Z
command: python manage.py runserver 0.0.0.0:8000
env_file: ./stroylux/common.env
storefront:
container_name: "shop_storefront"
build:
context: ./storefront
dockerfile: ./Dockerfile.dev
args:
API_URI: "http://localhost:8000/graphql/"
DASHBOARD_URL: "http://localhost:9000/dashboard/"
STOREFRONT_URL: "http://localhost:81/"
SSR_API_URL: "http://api:8000/graphql/"
depends_on:
- api
restart: unless-stopped
command: ["/bin/sh", "-c", "pm2-runtime 'yarn run next-start-prod'"]
nginx:
image: nginx
restart: unless-stopped
volumes:
- ./storefront/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- storefront
- api
ports:
- 81:80
# storefront:
# build:
# context: ./storefront
# dockerfile: ./Dockerfile.dev
# ports:
# - 3000:3000
# restart: unless-stopped
# volumes:
# - ./storefront/:/app:cached
# - /app/node_modules/
# command: npm start -- --host 0.0.0.0
#
# dashboard:
# build:
# context: ./dashboard
# dockerfile: ./Dockerfile.dev
# ports:
# - 9000:9000
# restart: unless-stopped
# volumes:
# - ./dashboard/:/app:cached
# - /app/node_modules/
# command: npm start -- --host 0.0.0.0
db:
image: library/postgres:11.7-alpine
ports:
- 5432
restart: unless-stopped
volumes:
- stroylux-db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=stroylux
- POSTGRES_PASSWORD=stroylux
redis:
image: library/redis:5.0-alpine
ports:
- 6379:6379
restart: unless-stopped
volumes:
- stroylux-redis:/data
worker:
build:
context: ./stroylux
dockerfile: ./Dockerfile
args:
STATIC_URL: '/static/'
command: celery -A stroylux worker --app=main.celeryconf:app --loglevel=info
restart: unless-stopped
env_file: ./stroylux/common.env
depends_on:
- redis
volumes:
- ./stroylux/main/:/app/main:Z,cached
- ./stroylux/templates/:/app/templates:Z
- ./stroylux/media/:/app/media:Z
smtp:
image: mailhog/mailhog:v1.0.0
container_name: smtp
restart: unless-stopped
ports:
- 8025:8025
- 1025:1025
pgbouncer:
image: edoburu/pgbouncer:1.11.0
restart: unless-stopped
ports:
- 5432:5432
depends_on:
- db
volumes:
- ./stroylux/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro
- ./stroylux/userlist.txt:/etc/pgbouncer/userlist.txt:ro
volumes:
stroylux-db:
stroylux-redis:
static_volume:
stroylux-media: