Skip to content

Commit 4579d45

Browse files
committed
Update .env handling in deploy workflow and Docker config
1 parent c4b9b22 commit 4579d45

2 files changed

Lines changed: 2 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
2929
- name: Check .env file presence
3030
run: |
31-
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "test -f /opt/simradar21/env/.env && echo '✅ .env file exists' || (echo '❌ .env file is missing' && exit 1)"
31+
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "test -f /opt/simradar21/.env && echo '✅ .env file exists' || (echo '❌ .env file is missing' && exit 1)"
3232
3333
- name: Copy files to VM
3434
run: |
3535
rsync -avz --delete \
36-
--filter="P /env/" \
36+
--exclude=".env" \
3737
--filter=":- .deployignore" \
3838
-e "ssh -o StrictHostKeyChecking=no" \
3939
./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/opt/simradar21

docker/docker-compose.prod.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ services:
33
image: postgres:18.1
44
container_name: sr21_postgres
55
restart: unless-stopped
6-
env_file:
7-
- ../env/.env
86
environment:
97
POSTGRES_USER: ${POSTGRES_USER}
108
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
@@ -24,8 +22,6 @@ services:
2422
image: redis:8.4.0
2523
container_name: sr21_redis
2624
restart: unless-stopped
27-
env_file:
28-
- ../env/.env
2925
environment:
3026
REDIS_PORT: ${REDIS_PORT}
3127
REDIS_PASSWORD: ${REDIS_PASSWORD}
@@ -46,8 +42,6 @@ services:
4642
context: ..
4743
dockerfile: packages/db/Dockerfile
4844
container_name: sr21_prisma
49-
env_file:
50-
- ../env/.env
5145
environment:
5246
POSTGRES_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public
5347
depends_on:
@@ -70,8 +64,6 @@ services:
7064
NEXT_PUBLIC_APP_VERSION: ${APP_VERSION}
7165
container_name: sr21_web
7266
restart: always
73-
env_file:
74-
- ../env/.env
7567
environment:
7668
NODE_ENV: production
7769
HOST: ${HOST}
@@ -99,8 +91,6 @@ services:
9991
dockerfile: apps/api/Dockerfile
10092
container_name: sr21_api
10193
restart: always
102-
env_file:
103-
- ../env/.env
10494
environment:
10595
NODE_ENV: production
10696
POSTGRES_USER: ${POSTGRES_USER}
@@ -142,8 +132,6 @@ services:
142132
dockerfile: apps/websocket/Dockerfile
143133
container_name: sr21_websocket
144134
restart: always
145-
env_file:
146-
- ../env/.env
147135
environment:
148136
NODE_ENV: production
149137
WS_HOST: ${HOST}
@@ -178,8 +166,6 @@ services:
178166
dockerfile: apps/ingestion/Dockerfile
179167
container_name: sr21_ingestion
180168
restart: always
181-
env_file:
182-
- ../env/.env
183169
environment:
184170
NODE_ENV: production
185171
POSTGRES_USER: ${POSTGRES_USER}
@@ -207,8 +193,6 @@ services:
207193
dockerfile: apps/updater/Dockerfile
208194
container_name: sr21_updater
209195
restart: always
210-
env_file:
211-
- ../env/.env
212196
environment:
213197
NODE_ENV: production
214198
POSTGRES_USER: ${POSTGRES_USER}

0 commit comments

Comments
 (0)