Open stormyark opened 2 days ago
It looks like your ./sharry.conf
doesn't exist or is a directory?
I changed the docker-compose a little but and created the the sharry.conf
docker-compose.yml:
services:
sharry:
image: eikek0/sharry:latest
container_name: sharry
command: /opt/docker-compose/sharry/sharry.conf
ports:
- "9090:9090"
volumes:
- ${PWD}/sharry.conf:/opt/sharry.conf
depends_on:
- db
networks:
- intranet
db:
image: postgres:16.3
container_name: postgres_db
volumes:
- ./postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname
networks:
intranet:
external: true
I'm not sure what to say - does it work now or is the error the same? If so, I guess it is still the same problem. If you like to pass a config file, it must exist and mounted to some location in the container and then this location (in the container) must be added as an argument in the command:
. I assume the location /opt/docker-compose/sharry/sharry.conf
doesn't exist in the container?
Yes sorry, I forgot to mention that its still the same problem.
So I am in the shown directory and there is a
sharry.conf
.
How can I check if the location /opt/docker-compose/sharry/sharry.conf exist in the container?
For example you could use docker run -it …
I think and then check. So this line
volumes:
- ${PWD}/sharry.conf:/opt/sharry.conf
mounts your local file into the container at path /opt/sharry.conf
. Then you need to specify this path. There are also docs about docker-compose explaining volumes (here for example).
I fixed it now. It turned out that sharry.conf
is a directory, so I created a file and now the error wont occur anymore. Thanks for your help!
My docker-compose.yml:
The according error: