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

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

Closed
piercebb opened this issue Jun 23, 2020 · 4 comments

Comments

@piercebb
Copy link
Contributor

piercebb commented Jun 23, 2020

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
Copy link
Contributor

DeeDeeG commented Jun 23, 2020

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
Copy link
Contributor

DeeDeeG commented Jun 23, 2020

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
Copy link
Contributor Author

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
Copy link
Contributor

DeeDeeG commented Dec 18, 2022

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 #675.

Thanks again for the issue report.

@DeeDeeG DeeDeeG closed this as completed Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants