Skip to content

Commit bc4ec5b

Browse files
committed
Update release env var and build args for web app
1 parent 372ef2a commit bc4ec5b

4 files changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
1616

17-
- name: Set release version
18-
run: echo "APP_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
19-
2017
- name: Set up SSH
2118
uses: webfactory/ssh-agent@v0.8.0
2219
with:
@@ -43,8 +40,8 @@ jobs:
4340
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
4441
cd /opt/simradar21
4542
46-
docker compose -f docker/docker-compose.prod.yml down
47-
docker compose -f docker/docker-compose.prod.yml pull || true
48-
docker compose --env-file /opt/simradar21/.env -f docker/docker-compose.prod.yml build
43+
docker compose --env-file /opt/simradar21/.env -f docker/docker-compose.prod.yml down
44+
docker compose --env-file /opt/simradar21/.env -f docker/docker-compose.prod.yml pull || true
45+
docker compose --env-file /opt/simradar21/.env -f docker/docker-compose.prod.yml build --build-arg NEXT_PUBLIC_RELEASE=${{ github.ref_name }}
4946
docker compose --env-file /opt/simradar21/.env -f docker/docker-compose.prod.yml up -d --remove-orphans
5047
EOF

apps/ingestion/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function fetchVatsimData(): Promise<void> {
8989
};
9090
rdsPub("ws:delta", delta);
9191

92-
console.log("Updated");
92+
// console.log("Updated");
9393
} catch (error) {
9494
console.error("❌ Error fetching VATSIM data:", error instanceof Error ? error.message : error);
9595
}

apps/web/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ COPY --from=prepare /app/out/full/ .
2121
ARG NEXT_PUBLIC_API_URL
2222
ARG NEXT_PUBLIC_WEBSOCKET_URL
2323
ARG NEXT_PUBLIC_R2_BUCKET_URL
24-
ARG NEXT_PUBLIC_APP_VERSION
24+
ARG NEXT_PUBLIC_APP_RELEASE
2525
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
2626
ENV NEXT_PUBLIC_WEBSOCKET_URL=$NEXT_PUBLIC_WEBSOCKET_URL
2727
ENV NEXT_PUBLIC_R2_BUCKET_URL=$NEXT_PUBLIC_R2_BUCKET_URL
28-
ENV NEXT_PUBLIC_APP_VERSION=$NEXT_PUBLIC_APP_VERSION
28+
ENV NEXT_PUBLIC_APP_RELEASE=$NEXT_PUBLIC_APP_RELEASE
2929

3030
RUN npm run build
3131

docker/docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ services:
6161
NEXT_PUBLIC_API_URL: "https://${DOMAIN}/api"
6262
NEXT_PUBLIC_WEBSOCKET_URL: "wss://${DOMAIN}/ws"
6363
NEXT_PUBLIC_R2_BUCKET_URL: ${NEXT_PUBLIC_R2_BUCKET_URL}
64-
NEXT_PUBLIC_APP_VERSION: ${APP_VERSION}
64+
NEXT_PUBLIC_APP_RELEASE: ${NEXT_PUBLIC_APP_RELEASE}
6565
container_name: sr21_web
6666
restart: always
6767
environment:

0 commit comments

Comments
 (0)