Browse Source

Muda porta do banco usado pelo docker

pull/284/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
committed by Edward Ribeiro
parent
commit
271bb1e2f2
  1. 6
      docker-compose.yml
  2. BIN
      sapl_30-03-16.tar
  3. 4
      scripts_docker/remove-db.sh
  4. 2
      scripts_docker/restore-db.sh

6
docker-compose.yml

@ -1,9 +1,11 @@
db:
localhost:
image: postgres
environment:
POSTGRES_PASSWORD: sapl
POSTGRES_USER: sapl
POSTGRES_DB: sapl
ports:
- "5532:5432"
web:
build: .
command: bash -c "python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000"
@ -12,4 +14,4 @@ web:
ports:
- "8000:8000"
links:
- db
- localhost

BIN
sapl_30-03-16.tar

Binary file not shown.

4
scripts_docker/remove-db.sh

@ -1,4 +1,4 @@
#!/bin/bash
sudo docker stop sapl_db_1
sudo docker rm sapl_db_1
sudo docker stop sapl_localhost_1
sudo docker rm sapl_localhost_1
sudo docker rmi -f postgres

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
sudo pg_restore --disable-triggers --data-only sapl_30-03-16.tar | docker exec -i sapl_localhost_1 psql -U sapl

Loading…
Cancel
Save