RefugeRestrooms / refugerestrooms

REFUGE restrooms indexes and maps safe restroom locations for trans, intersex, and gender nonconforming individuals.
http://www.refugerestrooms.org
GNU Affero General Public License v3.0
891 stars 263 forks source link

.env file variable syntax is not compatible with latest docker-compose version 1.25.5 #624

Closed piercebb closed 1 year ago

piercebb commented 4 years ago

The issue

During project setup after cloning the project and installing docker, running docker-compose generated an error:

pierce@peridot refugerestrooms % docker-compose build
ERROR: In file ./.env: environment variable name 'export DEVISE_SECRET_KEY' may not contain whitespace.

Others have run into similar issues using export MY_VAR=MY_VAL in .env files, which are compatible with docker-compose version 1.23.1 .

Scope / difficulty

I anticipate this will be a straight-forward fix: updating the syntax of the variables as outlined in the docker documentation.

Impact

Updating .env will un-block setting up the project and support developers as they set up their development environment.

Rationale

I ran into this issue during project setup and I anticipate others may get blocked as well.

Proposal

Update .env variables so that they are compatible with the latest docker-compose version 1.25.5.

How to actually do this:

  1. Edit the .env file
  2. Change variable declaration to be VAR=VAL format instead of export VAR=VAL.

See Docker's docs on declaring default environment variables here.

DeeDeeG commented 4 years ago

Hi @piercebb, thanks for being interested in Refuge!

We can try changing the .env file, I'll look into that when I get the time. (I want to make sure everything still works without the export command.)

I can confirm this is fixed again in docker-compose 1.26. This is a brand new release less than a month old. The problem started with docker-compose 1.24.0.

I'm happy to respond to any other questions, issues or Pull Requests, etc.

DeeDeeG commented 4 years ago

I have put together a wiki page of errors folks may run into: https://github.com/RefugeRestrooms/refugerestrooms/wiki/Troubleshooting-Docker

It has most of the errors I've seen with Docker. Perhaps this should be linked to from CONTRIBUTING.md.

piercebb commented 4 years ago

Very glad to hear this is fixed in docker-compose 1.26 🎉

&& Yay for that docker wiki! I agree - I think linking it in the CONTRIBUTING.md docs would be helpful for a quick reference if someone gets blocked during setup and also as an entry-point to the Wiki in general.

DeeDeeG commented 1 year ago

This issue is resolved with newer versions of docker-compose and was further fixed for older versions of docker-compose by removing export from the .env file in https://github.com/RefugeRestrooms/refugerestrooms/pull/675.

Thanks again for the issue report.