Skip to content

Commit dd1cbe1

Browse files
authored
fix: add backend url (#289)
* fix: add backend url * fix: remove dockerfile backend env * fix: add new variables to envs * fix: switch ports * fix: add build arg for backend url * fix: replace the existing bn env * fix: add secret key * fix: naming * fix: run on push
1 parent 70ce042 commit dd1cbe1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/docker-img.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ jobs:
3838
username: ${{ secrets.DO_USERNAME }}
3939
key: ${{ secrets.DO_KEY }}
4040
port: ${{ secrets.DO_PORT }}
41+
envs: BACKEND_URL, PUSHER_KEY, PUSHER_CLUSTER, REACT_APP_CLOUDINARY_UPLOAD_PRESET, REACT_APP_CLOUDINARY_NAME, CLIENT_ID, JWT_SECRET
4142
script: |
42-
set -e # Exit on errors
43-
set -x # Debugging enabled
4443
4544
# Create .env file with required environment variables
4645
cat <<EOF > .env
@@ -50,21 +49,22 @@ jobs:
5049
PUSHER_CLUSTER=${{ secrets.PUSHER_CLUSTER }}
5150
REACT_APP_CLOUDINARY_UPLOAD_PRESET=${{ secrets.REACT_APP_CLOUDINARY_UPLOAD_PRESET }}
5251
REACT_APP_CLOUDINARY_NAME=${{ secrets.REACT_APP_CLOUDINARY_NAME }}
52+
JWT_SECRET=${{ secrets.JWT_SECRET }}
5353
EOF
5454
5555
# Pull the latest Docker image
5656
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/atlp-devpulse-fn:latest
5757
58-
# Stop and remove any existing container on port 4008
59-
existing_container=$(docker ps -q --filter "publish=4008")
58+
# Stop and remove any existing container on port 4010
59+
existing_container=$(docker ps -q --filter "publish=4010")
6060
if [ -n "$existing_container" ]; then
6161
docker stop "$existing_container"
6262
docker rm "$existing_container"
6363
fi
6464
6565
# Run the new container
6666
container_id=$(docker run -d \
67-
-p 4008:5000 \
67+
-p 4010:81 \
6868
--env-file .env \
6969
${{ secrets.DOCKER_HUB_USERNAME }}/atlp-devpulse-fn:latest)
7070

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:22-alpine AS builder
33
WORKDIR /app
44

55
# Add the backend application in environment variables
6-
ENV BACKEND_URL=https://atlp-devpulse-bn.onrender.com
6+
ENV BACKEND_URL=https://applications-bn.devpulse.org
77

88
# Copy package.json and package-lock.json
99
COPY package*.json ./

0 commit comments

Comments
 (0)