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

Update Docker setup and instructions #4351

Merged
merged 3 commits into from
May 17, 2024
Merged

Update Docker setup and instructions #4351

merged 3 commits into from
May 17, 2024

Conversation

kitsuta
Copy link
Member

@kitsuta kitsuta commented May 2, 2024

The Python REPL wasn't working because its environment variables were being overridden instead of extended. Also, due to the changes with how we mount everything, the web container no longer had the python startup file mounted. This fixes both those issues by moving the file and env variable to the base << *uber config. Also updates the instructions based on an issue I ran into with setting up some of our events.

The Python REPL wasn't working because its environment variables were being overridden instead of extended. Also, due to the changes with how we mount everything, the web container no longer had the python startup file mounted. This fixes both those issues by moving the file and env variable to the base << *uber config. Also updates the instructions based on an issue I ran into with setting up some of our events.
@kitsuta kitsuta requested a review from bitbyt3r May 2, 2024 23:39
@@ -31,6 +32,7 @@ x-dev-volumes:
- &plugin-config-file-1 MAGSTOCK_CONFIG_FILES=config.ini
- &plugin-config-file-2 MAGWEST_CONFIG_FILES=config.ini
- &plugin-config-file-3 MAGPRIME_CONFIG_FILES=config.ini
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to rename everything to config.ini rather than use:

Suggested change
- &plugin-config-file-3 MAGPRIME_CONFIG_FILES=config.ini
- &plugin-config-file-1 MAGSTOCK_CONFIG_FILES=magstock.ini
- &plugin-config-file-2 MAGWEST_CONFIG_FILES=magwest.ini
- &plugin-config-file-3 MAGPRIME_CONFIG_FILES=magprime.ini

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, good point. That's to mirror the one-event setup, which uses config.ini as the filename so you only have to edit the name of the _CONFIG_FILES env var. We can take it out of this setup though.

@@ -45,6 +47,7 @@ services:
- *plugin-config-file-1
- *plugin-config-file-2
- *plugin-config-file-3
- *plugin-list
Copy link
Member

Choose a reason for hiding this comment

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

It might be easier at this point to just move the reference up one level and copy the whole environment section to every uber container.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't expect most people to have to mess with the EVENTNAME compose project name, though, so it seemed like overkill to make everyone deal with it.

One thing I have considered is using an .env file instead of defining the config in the docker compose. That might be worth doing now and it might be even better in the future.

- uber_dev_box=True
volumes:
- $PWD:/app/
- $PWD/../magprime:/app/plugins/magprime
- $PWD/.pythonstartup.py:/app/.pythonstartup.py
Copy link
Member

Choose a reason for hiding this comment

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

This should be available already as part of - $PWD:/app/ since it mounts in the whole directory.

/app # ls -la .*.py
-rw-r--r--    1 root     root          1226 May  7 01:25 .pythonstartup.py

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh... I swear my web container didn't have it, but now it does. Not sure how that happened, but I'll remove this line.

I may have gone a little overboard on the docs
@kitsuta kitsuta merged commit 3da46f7 into main May 17, 2024
3 checks passed
@kitsuta kitsuta deleted the update-local-setup branch May 17, 2024 01:52
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.

None yet

2 participants