Added docker-compose file to start service

This commit is contained in:
Steve White 2024-10-23 12:51:43 -05:00
parent 188f09e5fe
commit 96d2aeae19
1 changed files with 22 additions and 0 deletions

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
version: '3.3' # Specify the Docker Compose file version
services:
boxes-api:
image: boxes-api:latest # Use the existing boxes-api image
container_name: boxes-api # Name the container
ports:
- "8080:8080" # Map host port 8080 to container port 8080
environment:
BOXES_API_CONFIG: "/app/config/config.yaml" # Set the CONFIG environment variable
volumes:
- /home/stwhite/dockerboxes/boxes-api/data:/app/data # Mount host data directory
- /home/stwhite/dockerboxes/boxes-api/images:/app/images # Mount host images directory
- /home/stwhite/dockerboxes/boxes-api/config:/app/config # Mount host config directory
- /home/stwhite/dockerboxes/boxes-api/build:/app/build
networks:
- app-network
networks:
app-network:
driver: bridge