Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Start persisted MySQL docker Container with application #28

Open
derwild opened this issue Aug 19, 2020 · 3 comments
Open

Start persisted MySQL docker Container with application #28

derwild opened this issue Aug 19, 2020 · 3 comments
Assignees

Comments

@derwild
Copy link
Member

derwild commented Aug 19, 2020

The application should run a MySQL container when starting and make sure it is shut down when the server stops:

process.on('exit', function () { 
console.log('About to exit.');
 });

All data saved into the mydql has to be persisted locally when shutting down the application.

The goal of this is to build the framework to save all configuration and server specific data into this database (e.g. The store)

@N4ppo
Copy link
Contributor

N4ppo commented Aug 31, 2020

assign to me pls

@N4ppo
Copy link
Contributor

N4ppo commented Oct 28, 2020

Actually, after a lot of searching around, I think starting the mysql docker container from the JS app is not the best way to go about this. I would rather pack the app in its own docker container and start both the app and the database via docker-compose. I will provide a Dockerfile for containerizing the app and a docker-compose file for running the app and mysql container.

@derwild
Copy link
Member Author

derwild commented Oct 29, 2020

There are currently two problems when we start the application itself in a container.

  1. The config file (config/config.json) is updated on demand in production. This would mean it would have to be edited in the container and changes would be lost when restarting
  2. The questions (config/questions.json) are also updated on demand via the webui and manually pushed into the repo from time to time (same issue as above)
    There are actually tasks for both these processes to be reworked and improved: Change settings in webui and save to database  #30 and Move questions to seperate repository and use that in the application  #31
    Maybe we should implement those first.

Also make sure the containerization works with the new service wrapper pm2

@N4ppo N4ppo mentioned this issue Nov 21, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants