Replies: 2 comments 4 replies
-
Hello checking to see if anyone is using this with portainer and if they can share their docker compose file. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @hunkyn, I'm not specifically aware of how/if Portainer handles environment files, but if you're having issues with using an environment file like environment:
- ENV_VAR1=value1
- ENV_VAR2=value2 So for your case, you can structure your version: '3.8'
services:
server:
image: msdeluise/plant-it-server:latest
environment:
- MYSQL_HOST=db
- MYSQL_PORT=3306
- MYSQL_USERNAME=root
- MYSQL_PSW=root
- MYSQL_DATABASE=bootdb
- MYSQL_ROOT_PASSWORD=root
- JWT_SECRET=putTheSecretHere
- JWT_EXP=1
- USERS_LIMIT=-1
- UPLOAD_DIR=/upload-dir
- API_PORT=8080
- TREFLE_KEY=
- LOG_LEVEL=DEBUG
- ALLOWED_ORIGINS=*
- CACHE_TTL=86400
- CACHE_HOST=cache
- CACHE_PORT=6379
- SSL_ENABLED=false
- CERTIFICATE_PATH=/certificates/
depends_on:
- db
- cache
restart: unless-stopped
volumes:
- "./upload-dir:/upload-dir"
- "./certs:/certificates"
ports:
- "8080:8080"
- "3000:3000"
db:
image: mysql:8.0
restart: always
env_file: server.env
volumes:
- "./db:/var/lib/mysql"
cache:
image: redis:7.2.1
restart: always Does this solve your question, or have I misunderstood it? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How do I leverage the server.env file if I want to use the docker compose in portainer? I tried several ways and it keeps failing. Is there a way I can use the environment tags in the docker compose directly or do we have to use the file?
Beta Was this translation helpful? Give feedback.
All reactions