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

[docker] Load fixtures only on dev environment #826

Closed
wants to merge 1 commit into from

Conversation

Ferror
Copy link
Contributor

@Ferror Ferror commented Sep 15, 2022

#813

Turning off relading the fixtures is just one line, and I decided not to overcomplicate the default config and just keep the fixtures reloading on the dev environment, but not on production and testing.

@Ferror Ferror requested a review from a team as a code owner September 15, 2022 17:41
@probot-autolabeler probot-autolabeler bot added the Docker Docker-related issues and PRs. label Sep 15, 2022
@vvasiloi
Copy link
Contributor

vvasiloi commented Sep 15, 2022

Now run docker-compose run --rm php bin/console any:command and see what happens.

@Ferror
Copy link
Contributor Author

Ferror commented Sep 15, 2022

Now run docker-compose run --rm php bin/console any:command and see what happens.

Why would you do docker compose run instead of docker compose exec? The container is up and running. Btw. Even without this change the service would start and execute everything that is in the docker-entrypoint.sh file. So I don't understand the point 😢

If you would like to use docker compose run... we should get rid of one of the if statements, but I don't believe that's the way the author wanted to use the container.

@vvasiloi
Copy link
Contributor

The point is that the dev should be able to use docker-compose run php, docker-compose restart php, docker-compose up -d --scale php=3 10 times a day without resetting the database every time.
Let's say I set up a context for reproducing a bug or testing a feature, I might add tons of data, and then for some reason I have to restart the container. All my work is gone now.
I always made my own Docker setups for Sylius, so I don't care about it for myself., but as more people will start using it I'm sure more will complain, it's just a matter of time.

@Ferror
Copy link
Contributor Author

Ferror commented Sep 19, 2022

The point is that the dev should be able to use docker-compose run php, docker-compose restart php, docker-compose up -d --scale php=3 10 times a day without resetting the database every time. Let's say I set up a context for reproducing a bug or testing a feature, I might add tons of data, and then for some reason I have to restart the container. All my work is gone now. I always made my own Docker setups for Sylius, so I don't care about it for myself., but as more people will start using it I'm sure more will complain, it's just a matter of time.

I think you may want to convert that message to the issue, as there is a specific thing you want to achieve and it's more like feedback for the whole PHP container execution than this particular change.

@Ferror
Copy link
Contributor Author

Ferror commented Nov 1, 2022

It will be changed by other PR. #859

@Ferror Ferror closed this Nov 1, 2022
@Ferror Ferror deleted the docker-load-fixtures branch November 1, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants