Closed renetsk closed 1 year ago
Setting the env file in compose yml with env_file
should simply be the path to the env file; try:
env_file:
- /home/user/data/jellyplex/.env
tried it, same result.
open /home/user/data/jellyplex/.env: no such file or directory
root@home:/home/user/data/jellyplex# ls -la
total 12
drwxr-xr-x 2 root root 4096 Apr 2 10:38 .
drwxr-xr-x 19 root root 4096 Apr 1 12:59 ..
-rw-r--r-- 1 root root 2890 Apr 1 12:59 .env
I havent used portainer all that much but the following docker compose file does work by itself.
version: '3.1'
services:
jellyplex-watched:
image: luigi311/jellyplex-watched:latest
container_name: jellyplex-watched
restart: always
pull_policy: always
volumes:
- .env:/app/.env
This also works with env_file assuming your compose file is in the same directory as your .env file so the env_file method does work.
version: '3.1'
services:
jellyplex-watched:
image: luigi311/jellyplex-watched:latest
container_name: jellyplex-watched
restart: always
pull_policy: always
env_file:
- .env
first code works fine for me but without pull_policy: always. it's not supported in portainer. Thank you so much.
glad its working now, weird that env_file wasnt working though.
Hello, scripts works perfect. Want to create stack in my portainer, how to do that please?
Still getting this error