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.
This command will prompt for confirmation before proceeding. Use the --force (-f) flag to bypass the prompt, which is useful for scripts or CI/CD pipelines.
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. Update the Environment
If you need to update an existing environment with new configuration settings, such as changing environment variables or using a different Docker Compose file, you can use the update command.
epos-opensource docker update my-epos-platform --env-file ./my-updated-config/.env
When to use it: Use this command when you want to apply configuration changes to an existing environment without deleting and recreating it from scratch. You can update the environment variables, Docker Compose file, force recreation of containers, update Docker images, or change the host settings.
6. 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.
This command will prompt for confirmation before proceeding. Use the --force (-f) flag to bypass the prompt, which is useful for scripts or CI/CD pipelines.
When to use it: Use this command when you want to completely remove an environment and all its associated resources.
Advanced Usage
This section covers some more advanced scenarios for managing your EPOS Platform deployments.
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
.envfile in themy-custom-configdirectory and modify thePOSTGRESQL_CONNECTION_STRINGto 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...