Browse Source

Muda configurações do banco e instala componentes do bower uma unica vez

pull/284/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
committed by Edward Ribeiro
parent
commit
01082cb8ab
  1. 2
      Dockerfile
  2. 10
      docker-compose.yml
  3. 2
      scripts_docker/restore-db.sh

2
Dockerfile

@ -49,3 +49,5 @@ ADD . /sapl
RUN pip install -r requirements/dev-requirements.txt
RUN pip install --upgrade setuptools
RUN python3 manage.py bower install

10
docker-compose.yml

@ -1,11 +1,15 @@
db:
localhost:
image: postgres
environment:
POSTGRES_PASSWORD: sapl
POSTGRES_USER: sapl
POSTGRES_DB: sapl
web:
build: .
command: bash -c "python3 manage.py migrate && python3 manage.py bower install && python3 manage.py runserver 0.0.0.0:8000"
command: bash -c "python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000"
volumes:
- .:/sapl
ports:
- "8000:8000"
links:
- db
- localhost

2
scripts_docker/restore-db.sh

@ -1,2 +1,2 @@
#!/bin/bash
pg_restore --disable-triggers --data-only sapl_30-03-16.tar | docker exec -i sapl_db_1 psql -U postgres
pg_restore --disable-triggers --data-only sapl_30-03-16.tar | docker exec -i sapl_localhost_1 psql -U sapl

Loading…
Cancel
Save