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

Remove need for an init script #327

Open
DumboOctopus opened this issue Apr 10, 2020 · 0 comments
Open

Remove need for an init script #327

DumboOctopus opened this issue Apr 10, 2020 · 0 comments

Comments

@DumboOctopus
Copy link
Member

DumboOctopus commented Apr 10, 2020

The init_script shouldn't be necessary. Here are the steps to removing it.

1. Remove the MeowSetting model

MeowSetting are using for adding API keys and configuring general settings. This should be replaced with django settings variables. These settings variables are declared in meow/meow/settings.py. The values for these setting variables should be retrieved from environment variables.

Then, whenever we need to use it, we just from settings import MEOW_VARAIBLE.

2. Creating the Test section and the Periodic Task

This will be tricky. We don't want any of our code for setting up these sections to run on production. Thus, we can't put this inside of the Dockerfile or the docker-compose or the entrypoint. I'm not sure how to do this yet. The best idea I have so far is putting an if statement in the entrypoint

if DEBUG = "true" then
   # create the test section if it doesn't exist
   # create the periodic task if it doesn't exist
fi

the issue with this is that it runs every time you start the container. This should only run the first time you start the container.

@DumboOctopus DumboOctopus changed the title Meow Settings should be replaces with django settings variables Meow Settings should be replaced with django settings variables Apr 18, 2020
@DumboOctopus DumboOctopus changed the title Meow Settings should be replaced with django settings variables Remove need for an init script Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant