-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix initialization of dockerized services #182
Comments
How fragile is this? |
If any of the containers were deleted it would break the env var settings and possibly prevent the docker-compose file from even being valid. As long as no one can get onto the server to break this it should be fine but its not an ideal scenario - especially for production! |
My AWS instance seems to be stuck in a state where snowplow is not started on boot. The log shows the same items along with:
Running
Is there a way to fix a borked instance? |
Things weren't coming up due to #191 |
Background story
During development of
0.6.0
, I used a cronjob runningdocker-compose restart
at reboot and RC instances weren't launching properly on GCP but launching fine on AWS. After some discussions, I created an init script and made Ansible place it under/etc/init.d/
, however I haven't made Ansible executeservice snowplow_mini start
command to launch the services, I made Ansible rundocker-compose up -d
command.Although both AWS and GCP RC instances launched fine after this change, this init script should be used to launch the service, instead of direct execution of
docker-compose
command.Why is it a bug?
Per docker-compose docs,
Although related Ansible task executes docker command in the same directory as
.env
, launch an instance and check/var/log/snowplow_mini.err
;Why does it work then?
Since first launch of docker services happen through direct execution of
docker-compose up -d
with correct environment variables from.env
, containers continue with these correct env values even you restart services through control plane or reboot the box.What to do?
1 - Launch docker services via init script instead of directly executing
docker-compose up -d
command.2 - After handling
1
, check if env vars are fetched correctly, fix if it is not the case.I noticed this thanks to @jbeemster .
The text was updated successfully, but these errors were encountered: