Open nixpulvis opened 3 years ago
We need:
IDK if it makes sense to use Docker and systemd at the same time, but I've been using a little unit like this for my own server:
[Unit]
Description=An Elite: Dangerous Database and Service
Requires=postgresql.service
After=postgresql.service
[Service]
Type=simple
User=nixpulvis
WorkingDirectory=/home/nixpulvis/projects/galos
ExecStart=/home/nixpulvis/.cargo/bin/galos-sync eddn
Restart=always
[Install]
WantedBy=multi-user.target
Probably missing a few things to be perfect, but it at least saves my logs in the system journal, and manages running the thing. Would be nice to not have everything installed in my home directory as well :sweat_smile:
Docker does make sense. You're on Linux, I'm on macOS, AWS has its own images, and we don't know what future devs will be using.
This will begin when #8 is ready enough to be tested.
There will probably be three services in the initial release of Galos:
galos-sync eddn
galos-worker
galos-bot
This will begin when #8 is ready enough to be tested.
@yevk we should be running galos-sync
as soon as possible now that we're not making backwards changes to the migrations. Then we can figure out how the bot will be fed information from the worker. However, for #8 I was assuming that we would just have a function call to cause the worker itself to issue a POST
to Discord.
I would consider this issue complete when the first service is up and running. If done well, future services should just be able to copy this template more or less.
@yevk has already written what can be the starting point for this here: https://github.com/M1K3SD1/BGS-Project/blob/main/docker/release-build.
We just need to install PostgreSQL/PostGIS as well, and other things will be mostly the same.
Error handling
We'll use the Docker restart policy for crashing containers: https://docs.docker.com/config/containers/start-containers-automatically/