-
-
Notifications
You must be signed in to change notification settings - Fork 13
DevOps
Raphaël Odini edited this page Oct 21, 2024
·
2 revisions
// names are custom
psql -c "CREATE USER open_prices_team WITH PASSWORD 'password'"
psql -c "CREATE DATABASE open_prices OWNER open_prices_team"
psql -c "GRANT ALL PRIVILEGES ON DATABASE open_prices to open_prices_team"
psql -c "ALTER USER open_prices_team CREATEROLE CREATEDB"
POSTGRES_DB=open_prices POSTGRES_USER=open_prices_team POSTGRES_PASSWORD=password POSTGRES_HOST=localhost ALLOWED_HOSTS=localhost,127.0.0.1 SECRET_KEY=key OAUTH2_SERVER_URL=https://world.openfoodfacts.org/cgi/auth.pl DEBUG=True poetry run python manage.py runserver
// logs
docker logs open_prices-api-1 -f
docker logs open_prices-scheduler-1
// exec
docker exec -it open_prices-api-1 python
docker exec -it open_prices-api-1 python manage.py shell_plus
docker exec -it open_prices-postgres-1 psql -U postgres
// restart
docker restart open_prices-nginx-1