From fab02d03a9d3aaa2f1ff20cd53f2a5c15adcc289 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 27 Dec 2024 21:01:31 +0800 Subject: [PATCH] fix: update env samples, use dash only for naming networks --- .env.prod.sample | 2 +- .env.sample | 2 +- docker-compose.yml | 1 + server/src/config.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.prod.sample b/.env.prod.sample index 8cf901b..c200152 100644 --- a/.env.prod.sample +++ b/.env.prod.sample @@ -3,6 +3,7 @@ PORT=3000 BASE_URL=https://example.com SECRET_KEY=YOU_SHOULD_CHANGE_THIS BACKEND_URL=http://backend:3000 +DOCKER_NETWORK=linux-odyssey-players MONGO_ROOT_PASSWORD=adminpassword MONGO_USER=commander @@ -29,7 +30,6 @@ ADMIN_PORT=3001 # GITHUB_CLIENT_SECRET= # SURVEY_URL= # BUG_REPORT_URL= -# DOCKER_NETWORK= # SURVEY_URL= # BUG_REPORT_URL= diff --git a/.env.sample b/.env.sample index 06be919..c5c7643 100644 --- a/.env.sample +++ b/.env.sample @@ -3,6 +3,7 @@ PORT=3000 BASE_URL=http://localhost:5173 MONGO_URL=mongodb://localhost:27017/odyssey-test SECRET_KEY=sample-secret +DOCKER_NETWORK=linux-odyssey-players-dev # Optional # BACKEND_URL=http://host.docker.internal:3000 @@ -17,7 +18,6 @@ SECRET_KEY=sample-secret # GITHUB_CLIENT_SECRET= # SURVEY_URL= # BUG_REPORT_URL= -# DOCKER_NETWORK= # SURVEY_URL= # BUG_REPORT_URL= diff --git a/docker-compose.yml b/docker-compose.yml index b32db0f..d07b75a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,4 +23,5 @@ services: networks: internal: players-dev: + name: linux-odyssey-players-dev internal: false diff --git a/server/src/config.ts b/server/src/config.ts index c109868..804888f 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -72,7 +72,7 @@ function createConfig() { projectRoot, docker: { - network: get('DOCKER_NETWORK', 'linux-odyssey-players'), + network: get('DOCKER_NETWORK', 'linux-odyssey-players-dev'), defaultImage: get('QUEST_IMAGE', 'linuxodyssey/quest-base'), imagePrefix: get('DOCKER_PREFIX', 'linuxodyssey/quest-'), mountQuest: process.env.MOUNT_QUEST === 'true',