fix: remove env_file field but subsistute from shell

This commit is contained in:
Lin, Hung-Shin committed 2023-10-05 13:31:15 +08:00
1 parent aac1592957
commit a79b66ed8d
5 files changed
+23 -4

No files matched your search

+15
View File
@@ -19,6 +19,10 @@ Run everything (frontend, backend, db, swagger, quests):
docker compose build
docker compose up -d
If you want to enable social login, you should have OAuth client token in a `.env` file:
docker compose --env-file .env up -d
## Testing
Run Cypress locally, using the current development containers:
@@ -42,6 +46,17 @@ Run Cypress in container, create brand-new containers along with it:
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d
To enable social login, you should have OAuth client token in a `.env` file:
You can copy from `example.env`
# .env
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
To enable it:
docker compose --env-file .env -f docker-compose.prod.yml up -d
## Standalone App (without Docker)
Source: `app/`
+2
View File
@@ -41,6 +41,8 @@ services:
- MONGO_USER=user
- MONGO_PASS=user-password
- MONGO_DB=odyssey-test
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
base:
image: lancatlin/linux-odyssey:base
+2 -2
View File
@@ -36,11 +36,11 @@ services:
- players
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- .env
environment:
- MONGO_URL=mongodb://user:user-password@db-test:27017/odyssey-test
- DOCKER_NETWORK=linux-odyssey-players
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
db-test:
image: mongo
+2 -2
View File
@@ -26,12 +26,12 @@ services:
- ./server/swagger.yaml:/app/server/swagger.yaml
- ./packages:/app/packages
- ./quests:/app/quests
env_file:
- .env
environment:
- MONGO_URL=mongodb://db:27017/odyssey-test
- DOCKER_NETWORK=linux-odyssey-players
- HOST_PWD=${PWD}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
db:
image: mongo
networks:
+2
View File
@@ -0,0 +1,2 @@
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=