Skip to content

Commit e7c2e24

Browse files
committed
chore: simplify environment variable definitions in Docker configurations
- Removed default value syntax for `DB_CONNECTION_STRING`, `REDIS_HOST`, and `REDIS_PORT` in `docker-stack.server.yml` and GitHub Actions workflow to streamline configuration. - Ensured consistency in service connection strings across both files. Signed-off-by: Innei <tukon479@gmail.com>
1 parent 87f02e0 commit e7c2e24

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ jobs:
200200
MX_PORT=${MX_PORT:-2333}
201201
ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-localhost:*}
202202
# For Swarm stack name `mx-core`, service names are `mx-core_mongo` / `mx-core_redis`
203-
DB_CONNECTION_STRING=${DB_CONNECTION_STRING:-mongodb://mx-core_mongo:27017/mx-space}
204-
REDIS_HOST=${REDIS_HOST:-mx-core_redis}
205-
REDIS_PORT=${REDIS_PORT:-6379}
203+
DB_CONNECTION_STRING=mongodb://mx-core_mongo:27017/mx-space
204+
REDIS_HOST=mx-core_redis
205+
REDIS_PORT=6379
206206
ENCRYPT_ENABLE=${ENCRYPT_ENABLE:-true}
207207
ENCRYPT_KEY=${ENCRYPT_KEY:-}
208208
JWT_SECRET=${JWT_SECRET:-}

docker-stack.server.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ services:
1717

1818
# MongoDB (service in this stack)
1919
# NOTE: In Docker Swarm stack, service names are prefixed with the stack name,
20-
# e.g. `mx-core_mongo` / `mx-core_redis`. If you deploy the stack with a
21-
# different name, override these via env.
22-
DB_CONNECTION_STRING: ${DB_CONNECTION_STRING:-mongodb://mx-core_mongo:27017/mx-space}
20+
# e.g. `mx-core_mongo` / `mx-core_redis`.
21+
DB_CONNECTION_STRING: mongodb://mx-core_mongo:27017/mx-space
2322

2423
# Redis (service in this stack)
25-
REDIS_HOST: ${REDIS_HOST:-mx-core_redis}
24+
REDIS_HOST: mx-core_redis
2625
REDIS_PORT: "6379"
2726

2827
# Security (optional)

0 commit comments

Comments
 (0)