Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the setup script, capture only what is absolutely needed #576 #591

Merged
merged 11 commits into from
Sep 28, 2022
Merged
37 changes: 36 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,39 @@ MONGO_PORT=27017
MONGO_INITDB_ROOT_USERNAME=praiseDbRootUsername
MONGO_INITDB_ROOT_PASSWORD=
MONGO_USERNAME=praiseDbUsername
MONGO_PASSWORD=
MONGO_PASSWORD=


# # FRONTEND ##

# Full URL to host where API is running. This variable is not currently used in production.
# Why? The frontend is built as a static website and cannot easily accept
# env variables. There are workarounds but we haven't prioritised to implement them yet.
#
# ℹ️ https://jakobzanker.de/blog/inject-environment-variables-into-a-react-app-docker-on-runtime/
REACT_APP_SERVER_URL=https://localhost

# Port number used when running frontend for development, outside of Docker
PORT=3000


## API ##
ADMINS=

## API AUTHENTICATION ##
JWT_SECRET=
# expires after 1 hour of inactivity, or 3 days
JWT_ACCESS_EXP=3600
JWT_REFRESH_EXP=25920000

## LOGGING ##
JET_LOGGER_MODE=CONSOLE
JET_LOGGER_FILEPATH=jet-logger.log
JET_LOGGER_TIMESTAMP=TRUE
JET_LOGGER_FORMAT=LINE


## DISCORD_BOT ##
DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_GUILD_ID=
3 changes: 0 additions & 3 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ services:
image: ghcr.io/commons-stack/praise-dev/api:latest
env_file:
- .env
- ./packages/api/.env
restart: always
ports:
- $API_PORT:$API_PORT
Expand All @@ -29,7 +28,6 @@ services:
image: ghcr.io/commons-stack/praise-dev/discord-bot:latest
env_file:
- .env
- ./packages/discord-bot/.env
restart: always
links:
- mongodb
Expand All @@ -39,7 +37,6 @@ services:
image: ghcr.io/commons-stack/praise-dev/frontend:latest
env_file:
- .env
- ./packages/frontend/.env
restart: unless-stopped
ports:
- 80:80
Expand Down
9 changes: 3 additions & 6 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ services:
image: api
env_file:
- .env
- ./packages/api/.env
build:
build:
context: ./
dockerfile: ./packages/api/Dockerfile
restart: always
Expand All @@ -32,8 +31,7 @@ services:
image: discord-bot
env_file:
- .env
- ./packages/discord-bot/.env
build:
build:
context: ./
dockerfile: ./packages/discord-bot/Dockerfile
restart: always
Expand All @@ -45,8 +43,7 @@ services:
image: frontend
env_file:
- .env
- ./packages/frontend/.env
build:
build:
context: ./
dockerfile: ./packages/frontend/Dockerfile
restart: unless-stopped
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ services:
image: ghcr.io/commons-stack/praise/api:latest
env_file:
- .env
- ./packages/api/.env
restart: always
ports:
- $API_PORT:$API_PORT
Expand All @@ -29,7 +28,6 @@ services:
image: ghcr.io/commons-stack/praise/discord-bot:latest
env_file:
- .env
- ./packages/discord-bot/.env
restart: always
links:
- mongodb
Expand All @@ -39,7 +37,6 @@ services:
image: ghcr.io/commons-stack/praise/frontend:latest
env_file:
- .env
- ./packages/frontend/.env
restart: unless-stopped
ports:
- 80:80
Expand Down
18 changes: 0 additions & 18 deletions packages/api/.env.template

This file was deleted.

10 changes: 0 additions & 10 deletions packages/discord-bot/.env.template

This file was deleted.

13 changes: 0 additions & 13 deletions packages/frontend/.env.template

This file was deleted.

Loading