Managing Docker Deployments
This guide provides real-world examples of how to use the epos-opensource docker
commands to manage your EPOS Platform deployments on a single machine using Docker Compose.
Common Workflow
This section walks you through a typical workflow for creating, populating, and managing a new EPOS Platform environment.
1. Deploy a New Platform
First, you need to deploy a new environment. This command will create all the necessary Docker containers, networks, and volumes for a fully functional EPOS Platform instance.
epos-opensource docker deploy my-epos-platform
When to use it: Use this command when you want to create a new, clean instance of the EPOS Platform.
2. Populate with Sample Data
Once your platform is running, you can populate it with some sample data to see it in action.
epos-opensource docker populate my-epos-platform --example
When to use it: Use this command to quickly add some sample data to your platform for testing or demonstration purposes. You can also use it to populate your platform with your own data by providing a path to your .ttl
files instead of the --example
flag.
3. Check the Status
You can check the status of your deployed environments at any time.
epos-opensource docker list
This command will show you a list of all your environments, their status, and the URLs to access them.
When to use it: Use this command to get an overview of your deployed environments and their access URLs.
4. Clean the Data
If you want to reset the data in your environment without deleting the entire deployment, you can use the clean
command.
epos-opensource docker clean my-epos-platform
This action is irreversible and will delete all your data, including metadata, converter plugins, and any data added through the Backoffice.
When to use it: Use this command when you want to clear all the data from an environment and start over with a clean slate.
5. Delete the Environment
When you're finished with an environment, you can delete it completely.
epos-opensource docker delete my-epos-platform
This action is irreversible and will delete all your data and the entire deployment, including all containers, volumes, and networks.
Advanced Usage
This section covers some more advanced scenarios for managing your EPOS Platform deployments.
Using a Reverse Proxy for SSL
For production environments, we recommend using a reverse proxy (like Nginx or Traefik) in front of your EPOS Platform deployment to handle SSL encryption. The Docker deployment does not handle SSL out of the box.
Here is a conceptual example of how this would work:
- Deploy your EPOS Platform instance using the
epos-opensource docker deploy
command. - Configure your reverse proxy to listen on port 443 (HTTPS) and forward traffic to the EPOS Platform's services on their respective ports (e.g.,
http://localhost:32000
for the GUI). - Your reverse proxy would handle the SSL certificates and encrypt the traffic between the client and the proxy.
This setup provides a secure and flexible way to expose your EPOS Platform instance to the internet.
Using an External Database
By default, the EPOS Platform uses a Docker container for its PostgreSQL database. However, you can configure it to use an external PostgreSQL database instead.
-
Export the default environment file:
epos-opensource docker export ./my-custom-config
-
Edit the
.env
file in themy-custom-config
directory and modify thePOSTGRESQL_CONNECTION_STRING
to point to your external database.POSTGRESQL_CONNECTION_STRING="jdbc:postgresql://your-external-db-host:5432/your-db-name?user=your-user&password=your-password"
-
Deploy your platform using the custom environment file:
epos-opensource docker deploy my-custom-db-platform --env-file ./my-custom-config/.env
Here is an example of the .env
file for Docker. Note that this might be outdated, but the overall structure should be the same.
Loading...