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

Refactor/docker base config #388

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

Paulijuz
Copy link
Member

@Paulijuz Paulijuz commented Jan 26, 2025

When writing tests it became clear that having three different docker files is hard to maintain as all of the shared services have to specified three places. Especially when the env variables to the pn container would be annoying to maintain as changing it would mean changing it three places. This PR fixes it by adding a third (fourth with tests) docker compose file (docker-compose.base.yml) which contains all the shared services. Then the specific compose file (dev, test or prod) uses the extends keyword to use the service from the shared file and applies the required modifications, for example exposing different ports or using different volumes.

This PR also adds a skeleton for the docker file for tests. The testing framework itself will be implemented in another PR.

Also, I have added the npm run commants docker:dev, docker:test, and docker:prod for simplifying starting up docker. I don't expect people to use them, but they might be useful for some newcomers if they find it hard to remember the exact command to start the project. The commands for dev and test also automatically copy the .env.default file.

Copy link
Member

@theodorklauritzen theodorklauritzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants