-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.19 KB
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
version: '3'
services:
app:
restart: always
build: .
image: juanmagalhaes/rpg_manager_app:latest
container_name: ap01
environment:
- NODE_ENV=development
ports:
- "3000:3000"
volumes:
- .:/src
command: bash -c "[ ${NODE_ENV} == 'production' ] && yarn build && PORT=3000 yarn serve || yarn start"
web:
restart: always
image: juanmagalhaes/rpg_manager:latest
container_name: dg01
command: bash -c "
./scripts/wait-for-it.sh db:5432
&& ./manage.py makemigrations
&& ./manage.py migrate
&& ./manage.py create_superuser_with_password
--username ${ADMIN_USER}
--email ${ADMIN_EMAIL}
--password ${ADMIN_PASSWORD}
--noinput
--preserve
&& [ ${ENV} == 'production' ] && gunicorn core.wsgi -b 0.0.0.0:8000
|| ./manage.py runserver 0.0.0.0:8000
"
expose:
- "8000"
depends_on:
- db
ports:
- "8000:8000"
environment:
- DB_HOST=db
db:
restart: always
image: juanmagalhaes/rpg_manager_db:latest
container_name: ps01
ports:
- "5432:5432"
volumes:
- ${PG_DATA}:/var/lib/postgresql/data