Creating Systemd Services for Docker Compose
This guide will walk you through creating systemd services to manage your Docker Compose deployments. This ensures that your services start automatically on boot and can be managed easily using standard systemd commands.
Prerequisites
Before you begin, ensure the following prerequisites are met:
- You have Docker and Docker Compose installed on your server.
- You have completed the deployment steps for Liberty Framework using Docker Compose.
Creating the Systemd Service for Admin Tools
-
Create a service file for
docker-admin
: -
Paste the following content into the file:
-
Save and close the file.
Creating the Systemd Service for Liberty Framework
- Open a terminal.
-
Create a new directory:
-
Download the Docker Compose file from the provided URL, Using
curl
: -
Create a service file for
docker-liberty
: -
Paste the following content into the file:
-
Save and close the file.
Enabling and Starting the Services
-
Enable the created services to start on boot:
-
Start the services immediately:
-
Check the status of the services to ensure they are running:
Additional Resources
By following this guide, you should be able to create and manage systemd services for your Docker Compose deployments seamlessly. If you run into any issues or have any questions, refer to the additional resources provided or reach out to the respective support communities.