#121 Cleaning up & docker container integrating postgres+django
Showing
LICENSE
deleted
100644 → 0
... | ... | @@ -8,11 +8,7 @@ services: |
- POSTGRES_DB=adega | ||
web: | ||
build: . | ||
command: python3 ./src/manage.py makemigrations degree | ||
command: python3 ./src/manage.py makemigrations uploads | ||
command: python3 ./src/manage.py makemigrations educator | ||
command: python3 ./src/manage.py migrate | ||
command: python3 ./src/manage.py runserver 0.0.0.0:8000 | ||
command: bash "./docker_scripts/on_docker_init.sh" | ||
volumes: | ||
- .:/adega | ||
ports: | ||
... | ... | @@ -21,3 +17,8 @@ services: |
- db | ||
depends_on: | ||
- db | ||
environment: | ||
|
||
- POSTGRES_USER=adega | ||
- POSTGRES_PASSWORD=adega | ||
- POSTGRES_DB=adega | ||
- POSTGRES_HOST=adega_db_1 |
bash ./docker_scripts/wait-for-postgres.sh | ||
python ./src/manage.py migrate | ||
python ./src/manage.py runserver 0.0.0.0:8000 | ||
|
CREATE DATABASE adega; | ||
CREATE USER adega WITH PASSWORD 'adega'; | ||
-- ~ CREATE USER adega WITH PASSWORD 'adega'; | ||
ALTER ROLE adega SET client_encoding TO 'utf8'; | ||
ALTER ROLE adega SET default_transaction_isolation TO 'read committed'; | ||
ALTER ROLE adega SET timezone TO 'UTC-3'; | ||
GRANT ALL PRIVILEGES ON DATABASE adega TO adega; | ||
|
||
-- ~ ALTER ROLE adega SET client_encoding TO 'utf8'; | ||
-- ~ ALTER ROLE adega SET default_transaction_isolation TO 'read committed'; | ||
-- ~ ALTER ROLE adega SET timezone TO 'UTC-3'; | ||
-- ~ GRANT ALL PRIVILEGES ON DATABASE adega TO adega; |
script/.gitignore
deleted
100644 → 0
This diff is collapsed.