Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Commit

Permalink
Remove bind-mounts from colab and db services
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Fernandes <[email protected]>
  • Loading branch information
msfernandes committed Nov 9, 2017
1 parent afb9e60 commit 1d880c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ services:

db:
image: postgres
volumes:
- ./scripts/pgsql/create-databases.sh:/docker-entrypoint-initdb.d/create-databases.sh:z
healthcheck:
test: runuser postgres -c "pg_isready"
interval: 10s
Expand All @@ -27,6 +25,9 @@ services:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: root
PGDATA : /var/lib/postgresql/data/
volumes:
- colab_data:/var/lib/postgresql/data/

colab:
image: labhackercd/edemocracia-colab
Expand Down Expand Up @@ -66,7 +67,6 @@ services:
AUDIENCIAS_API_KEY: secret_key
WIKILEGIS_API_KEY: api_key
volumes:
- .:/var/labhacker/colab/colab
- colab_assets:/var/labhacker/colab/public:z
links:
- 'audienciasweb'
Expand Down
8 changes: 0 additions & 8 deletions scripts/pgsql/create-databases.sh

This file was deleted.

4 changes: 4 additions & 0 deletions start-colab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ if [[ "$ENABLE_AUDIENCIAS" = true ]]; then
fi

crond

PGPASSWORD=$DATABASE_PASSWORD psql -U $DATABASE_USER -w -h $DATABASE_HOST -c "CREATE DATABASE ${DATABASE_NAME} OWNER root"
colab-admin migrate
colab-admin initdb

colab-admin compress --force
colab-admin collectstatic --noinput

gunicorn colab.wsgi:application --config=/etc/colab/gunicorn.py

0 comments on commit 1d880c8

Please sign in to comment.