Skip to content

Anonymize docker compose#188

Open
rca wants to merge 3 commits intomvantellingen:developfrom
rca:anonymize-docker-compose
Open

Anonymize docker compose#188
rca wants to merge 3 commits intomvantellingen:developfrom
rca:anonymize-docker-compose

Conversation

@rca
Copy link

@rca rca commented Jun 12, 2017

Greetings,

This pull request makes a couple of changes to docker-compose to make it safer to use. The values for all environment variables have been removed from docker-compose.yml and they should, instead, be set in one of two ways:

  • export them as environment variables in the shell that docker-compose is being run from
  • write the values to a .env file alongside docker-compose.yml, which is automatically read by docker-compose and looks like this:
[berto@g6]$ cat .env
POSTGRES_DB=localshop
POSTGRES_USER=localshop
POSTGRES_PASSWORD=shopping
DJANGO_SECRET_KEY=a7d03faa0c054b3dba38b396bf3c7996
DATABASE_URL=postgresql://localshop:shopping@db/localshop
DJANGO_MEDIA_ROOT=/opt/localshop/media

This change makes the docker-compose file generic and allows the end-user to inject their own values without having to change the file.

Additionally, I updated postgres to the official image and verified that it works without any issue. Note: the database name, username, and password environment variables have changed accordingly.

@codecov
Copy link

codecov bot commented Jun 12, 2017

Codecov Report

Merging #188 into develop will increase coverage by 3.12%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #188      +/-   ##
===========================================
+ Coverage    82.15%   85.28%   +3.12%     
===========================================
  Files           36       33       -3     
  Lines         1390     1155     -235     
===========================================
- Hits          1142      985     -157     
+ Misses         248      170      -78
Impacted Files Coverage Δ
localshop/apps/dashboard/views.py 57.14% <0%> (-4.1%) ⬇️
localshop/apps/dashboard/urls.py 100% <0%> (ø) ⬆️
localshop/__init__.py
localshop/utils.py
localshop/views.py
localshop/urls.py
localshop/apps/permissions/migrations/__init__.py 100% <0%> (ø)
localshop/apps/permissions/utils.py 92.5% <0%> (+9.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c46af28...e5c1623. Read the comment docs.

@rca
Copy link
Author

rca commented Jul 19, 2017

Checking in on this, ping @mvantellingen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments