Running with Docker Compose
Prerequisites:
Before starting, ensure the following requirements are met:
-
Docker is installed Docker installation
-
Docker-compose is installed Docker-compose Installation
Api installation
Create a docker-compose.yml File
Here’s an example docker-compose.yml file:
services:api: image: docker.qix.sx/adentro/flow8:latest ports: - 127.0.0.1:8085:${SERVER_PORT} volumes: - ./.env:/app/.env - app-data:/app/storage working_dir: /app restart: always depends_on: - mongo networks: - backend entrypoint: /app/server
ui: image: docker.qix.sx/adentro/flow8-ui:latest ports: - 127.0.0.1:8080:80 depends_on: - api restart: always networks: - backend
mongo: image: mongo:latest restart: always ports: - 127.0.0.1:27017:27017 volumes: - mongo-data:/data/db networks: - backend
volumes: mongo-data: app-data:networks: backend:Create a .env File with environment variables.
Read more about in Environment variables section
Start the services
Run the following command to start all services defined in the docker-compose.yml file:
docker-compose up -dCheck the Status
Verify that the containers are running:
docker-compose ps