10884-dockerify #6

Merged
mravi merged 14 commits from 10884-dockerify into master 2022-09-19 08:27:32 +00:00
Showing only changes of commit bc4061f12a - Show all commits

View file

@ -1,5 +1,46 @@
# CHANGELOG.md
## 2.0 (2022-09-19) Dockerify https://redmine.ungleich.ch/issues/10884
Steps:
- Create .env.prod and .env.prod.db files
#### .env.prod
```
DEBUG=0
SECRET_KEY=secret_key_here
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
DJANGO_SETTINGS_MODULE=gmba_django.settings.production
ALLOWED_HOSTS=localhost,127.0.0.1,[::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=psql_db_name
SQL_USER=psql_username_name
SQL_PASSWORD=psql_passwordd
SQL_HOST=db
SQL_PORT=5432
```
#### .env.prod.db
```
POSTGRES_USER=psql_username_name
POSTGRES_PASSWORD=psql_passwordd
POSTGRES_DB=psql_db_name
```
Building containers
- docker-compose -f docker-compose.prod.yml down -v --remove-orphans
- docker-compose -f docker-compose.prod.yml up -d --build
Copy db and adust
- docker cp gd.sql gmba_django_db_1:/gd.sql
- docker-compose exec db psql --username=psql_username_name --dbname=psql_db_name < /gd.sql
Migrate / check
- docker-compose exec web python manage.py migrate --noinput
Static resources
- docker-compose -f docker-compose.prod.yml exec web python manage.py collectstatic --no-input --clear
## 1.12 (2022-01-19)
Bugfixes: