-
Notifications
You must be signed in to change notification settings - Fork 139
Description
Hello, good day!
Your Docker Compose file uses relative paths (e.g., ./config/...), which can be problematic when deploying through Portainer because the context directory might not be what you expect. Portainer might not have access to the same filesystem structure as your local development environment. Here are some steps and adjustments you can make to ensure it works properly:
General Adjustments
-
Use Absolute Paths: When deploying with
Portainer, it's better to use absolute paths for volumes to ensure the paths are correctly resolved. -
Verify Paths: Ensure all paths referenced in your
docker-compose.ymlactually exist on your host machine and are accessible. -
Permissions: Ensure the user running
Portainerhas the necessary permissions to access the files and directories specified.
One step to the right direction would be is to specify these /absolute/path/to/
version: '3'
name: netprobe
networks:
netprobe-net:
services:
redis:
restart: always
container_name: netprobe-redis
image: "redis:latest"
volumes:
- /absolute/path/to/config/redis/redis.conf:/etc/redis/redis.conf
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
netprobe:
restart: always
container_name: netprobe-probe
image: "plaintextpackets/netprobe:latest"
pull_policy: always
volumes:
- /absolute/path/to/netprobe_lite:/netprobe_lite
environment:
MODULE: "NETPROBE"
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
speedtest:
restart: always
container_name: netprobe-speedtest
image: "plaintextpackets/netprobe:latest"
pull_policy: always
volumes:
- /absolute/path/to/netprobe_lite:/netprobe_lite
environment:
MODULE: "SPEEDTEST"
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
presentation:
restart: always
container_name: netprobe-presentation
image: "plaintextpackets/netprobe:latest"
pull_policy: always
volumes:
- /absolute/path/to/netprobe_lite:/netprobe_lite
environment:
MODULE: "PRESENTATION"
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
prometheus:
restart: always
container_name: netprobe-prometheus
image: "prom/prometheus"
volumes:
- /absolute/path/to/config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus # Persistent local storage for Prometheus data
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
grafana:
restart: always
image: grafana/grafana-enterprise
container_name: netprobe-grafana
volumes:
- /absolute/path/to/config/grafana/datasources/automatic.yml:/etc/grafana/provisioning/datasources/automatic.yml
- /absolute/path/to/config/grafana/dashboards/main.yml:/etc/grafana/provisioning/dashboards/main.yml
- /absolute/path/to/config/grafana/dashboards/netprobe.json:/var/lib/grafana/dashboards/netprobe.json
- grafana_data:/var/lib/grafana
ports:
- '3001:3000'
networks:
- netprobe-net
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
prometheus_data:
grafana_data:Applying these changes should help resolve #29
If any of the config files are containing some path on your machine please also make it clear if it required to be specified.
example:
- public/app/plugins/datasource/prometheus/img/prometheus_logo.svg
- I'm seeing a
logsfolder in the git root folder. I assume this one needs an absolute path as well. netprobe, logging_helper, presentation