-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
36 lines (36 loc) · 1.11 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
version: '3'
services:
db:
image: mdillon/postgis
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: comida_chingona
POSTGRES_PASSWORD: tengohambre
POSTGRES_DB: comida_chingona
web:
build:
context: .
dockerfile: ./compose/django/Dockerfile
# Se crea usuario administrador (user: comelon psw:tengohambre)
# Siempre se va a sobreescribir el usuario.
command: bash -c "python manage.py wait_for_db && python manage.py loaddata fixtures/*.json && python manage.py runserver 0.0.0.0:8000"
# Si no quieres que se sobreesciba el usuario admin descomenta la sig line y comenta la anterior.
# command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
container_name: comida_chingona
volumes:
- ./src:/src
ports:
- "8000:8000"
depends_on:
- db
webpack:
build:
context: .
dockerfile: ./compose/webpack_ol/Dockerfile
command: sh -c "npm install && npm run watch"
volumes:
- ./src:/src
depends_on:
- web