Load Docker compose env vars from .env

This commit is contained in:
2024-02-26 10:08:53 +01:00
parent f02275df19
commit 57f3d7e24f
2 changed files with 5 additions and 2 deletions

2
.gitignore vendored
View File

@ -22,3 +22,5 @@ go.work
# Discord bot token # Discord bot token
settings.json settings.json
.env

View File

@ -2,7 +2,8 @@ services:
anewdawn: anewdawn:
image: ghcr.io/thelovinator1/anewdawn:latest image: ghcr.io/thelovinator1/anewdawn:latest
container_name: anewdawn container_name: anewdawn
env_file: .env
environment: environment:
- DISCORD_TOKEN= - DISCORD_TOKEN=${DISCORD_TOKEN}
- OPENAI_TOKEN= - OPENAI_TOKEN=${OPENAI_TOKEN}
restart: unless-stopped restart: unless-stopped