Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify env files, merge to one .env #151

Merged
merged 1 commit into from
Apr 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions scripts/discard-dev-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ git checkout \{\{cookiecutter.project_slug\}\}/README.md
git checkout \{\{cookiecutter.project_slug\}\}/.gitlab-ci.yml
git checkout \{\{cookiecutter.project_slug\}\}/cookiecutter-config-file.yml
git checkout \{\{cookiecutter.project_slug\}\}/docker-compose.deploy.networks.yml
git checkout \{\{cookiecutter.project_slug\}\}/env-backend.env
git checkout \{\{cookiecutter.project_slug\}\}/env-flower.env
git checkout \{\{cookiecutter.project_slug\}\}/.env
git checkout \{\{cookiecutter.project_slug\}\}/frontend/.env
git checkout \{\{cookiecutter.project_slug\}\}/env-pgadmin.env
git checkout \{\{cookiecutter.project_slug\}\}/env-postgres.env

31 changes: 31 additions & 0 deletions {{cookiecutter.project_slug}}/.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,34 @@ TRAEFIK_PUBLIC_TAG={{cookiecutter.traefik_public_constraint_tag}}
DOCKER_IMAGE_BACKEND={{cookiecutter.docker_image_backend}}
DOCKER_IMAGE_CELERYWORKER={{cookiecutter.docker_image_celeryworker}}
DOCKER_IMAGE_FRONTEND={{cookiecutter.docker_image_frontend}}

# Backend
BACKEND_CORS_ORIGINS={{cookiecutter.backend_cors_origins}}
PROJECT_NAME={{cookiecutter.project_name}}
SECRET_KEY={{cookiecutter.secret_key}}
FIRST_SUPERUSER={{cookiecutter.first_superuser}}
FIRST_SUPERUSER_PASSWORD={{cookiecutter.first_superuser_password}}
SMTP_TLS=True
SMTP_PORT={{cookiecutter.smtp_port}}
SMTP_HOST={{cookiecutter.smtp_host}}
SMTP_USER={{cookiecutter.smtp_user}}
SMTP_PASSWORD={{cookiecutter.smtp_password}}
EMAILS_FROM_EMAIL={{cookiecutter.smtp_emails_from_email}}

USERS_OPEN_REGISTRATION=False

SENTRY_DSN={{cookiecutter.sentry_dsn}}

# Flower
FLOWER_BASIC_AUTH={{cookiecutter.flower_auth}}

# Postgres
POSTGRES_SERVER=db
POSTGRES_USER=postgres
POSTGRES_PASSWORD={{cookiecutter.postgres_password}}
POSTGRES_DB=app

# PgAdmin
PGADMIN_LISTEN_PORT=5050
PGADMIN_DEFAULT_EMAIL={{cookiecutter.pgadmin_default_user}}
PGADMIN_DEFAULT_PASSWORD={{cookiecutter.pgadmin_default_user_password}}
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/docker-compose.shared.admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ services:
depends_on:
- db
env_file:
- env-pgadmin.env
- .env
proxy:
image: traefik:v1.7
volumes:
- /var/run/docker.sock:/var/run/docker.sock
flower:
image: mher/flower
env_file:
- env-flower.env
- .env
command:
- "--broker=amqp://guest@queue:5672//"
# For the "Broker" tab to work in the flower UI, uncomment the following command argument,
Expand Down
8 changes: 3 additions & 5 deletions {{cookiecutter.project_slug}}/docker-compose.shared.env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ version: '3.3'
services:
db:
env_file:
- env-postgres.env
- .env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
backend:
env_file:
- env-postgres.env
- env-backend.env
- .env
environment:
- SERVER_NAME=${DOMAIN}
- SERVER_HOST=https://${DOMAIN}
celeryworker:
env_file:
- env-postgres.env
- env-backend.env
- .env
environment:
- SERVER_NAME=${DOMAIN}
- SERVER_HOST=https://${DOMAIN}
3 changes: 1 addition & 2 deletions {{cookiecutter.project_slug}}/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ services:
dockerfile: tests.dockerfile
command: bash -c "while true; do sleep 1; done"
env_file:
- env-backend.env
- env-postgres.env
- .env
environment:
- SERVER_NAME=backend
- SERVER_HOST=http://${DOMAIN}
Expand Down
15 changes: 0 additions & 15 deletions {{cookiecutter.project_slug}}/env-backend.env

This file was deleted.

1 change: 0 additions & 1 deletion {{cookiecutter.project_slug}}/env-flower.env

This file was deleted.

3 changes: 0 additions & 3 deletions {{cookiecutter.project_slug}}/env-pgadmin.env

This file was deleted.

4 changes: 0 additions & 4 deletions {{cookiecutter.project_slug}}/env-postgres.env

This file was deleted.