From 01082cb8ab2c8f819e396f5e5ff50026753d72e3 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Wed, 30 Mar 2016 12:10:47 -0300 Subject: [PATCH] =?UTF-8?q?Muda=20configura=C3=A7=C3=B5es=20do=20banco=20e?= =?UTF-8?q?=20instala=20componentes=20do=20bower=20uma=20unica=20vez?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ docker-compose.yml | 10 +++++++--- scripts_docker/restore-db.sh | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0118dcb9f..e1afb6276 100644 --- a/Dockerfile +++ b/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 diff --git a/docker-compose.yml b/docker-compose.yml index e53f73384..1ffb56762 100644 --- a/docker-compose.yml +++ b/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 diff --git a/scripts_docker/restore-db.sh b/scripts_docker/restore-db.sh index 56186c05c..10eea3400 100755 --- a/scripts_docker/restore-db.sh +++ b/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