summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-06-29 19:24:48 +0100
committerJoe Carstairs <me@joeac.net>2026-06-29 19:24:48 +0100
commit8d1b6b114af099d2915f9adcf76d94016073dc5f (patch)
treeaf6a25b49be53d5cf5b2b406862995790dafbba3
parent75ca9d485d3bc98e80396c566278b9db8ba54d4b (diff)
uses env vars in compose.yml
-rw-r--r--compose.yml36
-rw-r--r--example.env16
2 files changed, 40 insertions, 12 deletions
diff --git a/compose.yml b/compose.yml
index f0abeec..4a508fb 100644
--- a/compose.yml
+++ b/compose.yml
@@ -1,12 +1,12 @@
services:
gemini:
- image: git.joeac.net/joeac/joeac.net-gemini
+ image: git.joeac.net/joeac/${CONTAINER_PREFIX}joeac.net-gemini
container_name: joeac.net-gemini
build:
context: .
dockerfile: gemini.Dockerfile
ports:
- - "1965:1965"
+ - "${GEMINI_PORT}:1965"
http:
image: git.joeac.net/joeac/joeac.net-http
@@ -14,10 +14,20 @@ services:
build:
context: .
dockerfile: http.Dockerfile
- env_file:
- - .env
+ environment:
+ MAX_DAILY_EMAILS: ${MAX_DAILY_EMAILS}
+ CONTACT_MAILBOX: ${CONTACT_MAILBOX}
+ CONTACT_MAILBOX_NAME: ${CONTACT_MAILBOX_NAME}
+ LOCAL_SMTP_FROM: ${LOCAL_SMTP_FROM}
+ LOCAL_SMTP_FROM_NAME: ${LOCAL_SMTP_FROM_NAME}
+ LOCAL_SMTP_HOST: ${LOCAL_SMTP_HOST}
+ LOCAL_SMTP_PORT: ${LOCAL_SMTP_PORT}
+ LOCAL_SMTP_USER: ${LOCAL_SMTP_USER}
+ LOCAL_SMTP_PASSWORD: ${LOCAL_SMTP_PASSWORD}
+ DB_SCHEME: ${DB_SCHEME}
+ DB_PATH: ${DB_PATH}
ports:
- - "8080:80"
+ - "${HTTP_PORT}:80"
etherpad:
image: git.joeac.net/joeac/joeac.net-etherpad
@@ -44,13 +54,15 @@ services:
context: .
dockerfile: smtp.Dockerfile
args:
- SMTP_PORT: 2500
- env_file:
- - .env
+ SMTP_PORT: ${LOCAL_SMTP_PORT}
environment:
- SMTP_PORT: 2500
- SMTP_USER: smtp
- SMTP_PASSWORD: smtp
+ LOCAL_SMTP_ENVELOPE_FROM: ${LOCAL_SMTP_ENVELOPE_FROM}
+ REMOTE_SMTP_HOST: ${REMOTE_SMTP_HOST}
+ REMOTE_SMTP_PORT: ${REMOTE_SMTP_PORT}
+ REMOTE_SMTP_USER: ${REMOTE_SMTP_USER}
+ SMTP_PORT: ${LOCAL_SMTP_PORT}
+ SMTP_USER: ${LOCAL_SMTP_USER}
+ SMTP_PASSWORD: ${LOCAL_SMTP_PASSWORD}
REMOTE_SMTP_PASSWORD_FILE: /run/secrets/remote_smtp_password
secrets:
- remote_smtp_password
@@ -64,7 +76,7 @@ services:
volumes:
- ./vaultwarden/vw-data/:/data/
ports:
- - "9000:80"
+ - "${VAULTWARDEN_PORT}:80"
secrets:
remote_smtp_password:
diff --git a/example.env b/example.env
index 78131f5..8ed6bc7 100644
--- a/example.env
+++ b/example.env
@@ -1,3 +1,7 @@
+# A prefix for remote container names
+# If you're running on ARM 32-bit CPU architecture, use 'armv7/', otherwise keep blank
+CONTAINER_PREFIX=
+
# The hostname to use for the local SMTP server
LOCAL_SMTP_HOST=
@@ -48,3 +52,15 @@ DB_SCHEME=
# The path part of the URI to the website database
DB_PATH=
+
+# The Node.JS environment for the Etherpad instance (production, development)
+ETHERPAD_NODE_ENV=production
+
+# The admin password for the Etherpad instance
+ETHERPAD_ADMIN_PASSWORD=
+
+# The ports on which to run apps
+ETHERPAD_PORT=9001
+HTTP_PORT=8080
+GEMINI_PORT=1965
+VAULTWARDEN_PORT=9000