File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ SERVER_ID = 1403539983821963274
2+ GUIDES_CHANNEL_ID = 1426998962635804712
3+ REPEL_LOG_CHANNEL_ID = 1403540596035027045
4+ REPEL_ROLE_ID = 1403545113904414842
5+ MODERATORS_ROLE_IDS = tbd
6+ ONBOARDING_CHANNEL_ID = tbd
7+ ONBOARDING_ROLE_ID = tbd
Original file line number Diff line number Diff line change @@ -38,19 +38,15 @@ jobs:
3838 export NODE_VERSION=$(cat .nvmrc | sed 's/v//')
3939 echo "Using Node version: $NODE_VERSION"
4040
41- # Create .env.local file with secrets
42- cat > .env.local << EOF
41+ # Create .env.secrets file with secrets
42+ cat > .env.secrets << EOF
4343 DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}
4444 CLIENT_ID=${{ secrets.CLIENT_ID }}
45- GUIDES_CHANNEL_ID=${{ secrets.GUIDES_CHANNEL_ID }}
46- SERVER_ID=${{ secrets.SERVER_ID }}
47- REPEL_LOG_CHANNEL_ID=${{ secrets.REPEL_LOG_CHANNEL_ID }}
48- REPEL_ROLE_ID=${{ secrets.REPEL_ROLE_ID }}
49- MODERATORS_ROLE_IDS=${{ secrets.MODERATORS_ROLE_IDS }}
50- ONBOARDING_CHANNEL_ID=${{ secrets.ONBOARDING_CHANNEL_ID }}
51- ONBOARDING_ROLE_ID=${{ secrets.ONBOARDING_ROLE_ID }}
5245 EOF
5346
47+ # copy .env.production file
48+ cp .env.production .env.production
49+
5450 # Stop any existing containers
5551 docker compose down || true
5652
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ services:
99 container_name : webdev-bot-prod
1010 restart : unless-stopped
1111 env_file :
12- - .env.local
12+ - .env.production
13+ - .env.secrets
1314 environment :
15+ - NODE_ENV=production
1416 - GUIDES_TRACKER_PATH=/app/data/guides-tracker.json
1517 volumes :
1618 # Persist guides tracker data
Original file line number Diff line number Diff line change @@ -32,4 +32,8 @@ function loadEnvFile(filePath: string) {
3232}
3333
3434// Load local environment file if it exists
35- loadEnvFile ( join ( process . cwd ( ) , '.env.local' ) ) ;
35+ // In production, docker will use .env.production and .env.secrets automatically
36+ const isProd = process . env . NODE_ENV === 'production' ;
37+ if ( ! isProd ) {
38+ loadEnvFile ( join ( process . cwd ( ) , '.env.local' ) ) ;
39+ }
You canβt perform that action at this time.
0 commit comments