Skip to content

Commit 80b6a9c

Browse files
committed
chore: add .env.production file reference to Docker services in docker-compose.prod.yml
- Included env_file directive for rest-api, hocuspocus-server, hocuspocus-worker, and webapp services to utilize the production environment variables. - Updated GitHub Actions workflow to simplify environment preparation steps and improve clarity.
1 parent fee18ff commit 80b6a9c

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.github/workflows/prod.docs.plus.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,10 @@ jobs:
4747

4848
- name: 🔐 Prepare Environment
4949
run: |
50-
echo "📁 Copying environment file..."
51-
if [ ! -f "${{ env.ENV_SOURCE }}" ]; then
52-
echo "❌ .env file not found at ${{ env.ENV_SOURCE }}"
53-
exit 1
54-
fi
50+
# Copy production env file
5551
cp "${{ env.ENV_SOURCE }}" "${{ env.ENV_FILE }}"
56-
57-
# Add deploy tag
5852
echo "DEPLOY_TAG=${{ env.DEPLOY_TAG }}" >> "${{ env.ENV_FILE }}"
59-
60-
# Validate required vars
61-
for var in DATABASE_URL SUPABASE_URL SUPABASE_ANON_KEY; do
62-
if ! grep -q "^${var}=" "${{ env.ENV_FILE }}"; then
63-
echo "❌ ${var} not found in .env"
64-
exit 1
65-
fi
66-
done
67-
echo "✅ Environment prepared"
53+
echo "✅ Environment ready"
6854
6955
- name: 🏗️ Build Docker Images
7056
run: |

docker-compose.prod.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ services:
8383
# ===========================================================================
8484
rest-api:
8585
image: docsy-hocuspocus:${DEPLOY_TAG:-latest}
86+
env_file: .env.production
8687
build:
8788
context: ./packages/hocuspocus.server
8889
dockerfile: docker/Dockerfile.bun
@@ -154,6 +155,7 @@ services:
154155
# ===========================================================================
155156
hocuspocus-server:
156157
image: docsy-hocuspocus:${DEPLOY_TAG:-latest}
158+
env_file: .env.production
157159
build:
158160
context: ./packages/hocuspocus.server
159161
dockerfile: docker/Dockerfile.bun
@@ -230,6 +232,7 @@ services:
230232
# ===========================================================================
231233
hocuspocus-worker:
232234
image: docsy-hocuspocus:${DEPLOY_TAG:-latest}
235+
env_file: .env.production
233236
build:
234237
context: ./packages/hocuspocus.server
235238
dockerfile: docker/Dockerfile.bun
@@ -286,6 +289,7 @@ services:
286289
# ===========================================================================
287290
webapp:
288291
image: docsy-webapp:${DEPLOY_TAG:-latest}
292+
env_file: .env.production
289293
build:
290294
context: .
291295
dockerfile: packages/webapp/docker/Dockerfile.bun

0 commit comments

Comments
 (0)