Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dv000303 add map location real time #365

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Set environment variables
run: echo "REACT_APP_TOKEN=${{ secrets.REACT_APP_TOKEN }}" > frontend/.env

- name: Install Dependencies
run: npm ci --force

Expand Down
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM gradle:7.4.2-jdk-alpine AS TEMP_BUILD_IMAGE

RUN apk add --no-cache bash
RUN echo "@personal http://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories
RUN apk add nodejs@personal npm@personal
RUN node --version
RUN npm --version
# Install dependencies
RUN apk add --no-cache bash \
&& echo "@personal https://dl-cdn.alpinelinux.org/alpine/v3.15/main" >> /etc/apk/repositories \
&& apk add --no-cache nodejs@personal npm@personal \
&& node --version \
&& npm --version

ENV APP_HOME=/usr/app/

Expand All @@ -15,10 +16,6 @@ COPY gradle $APP_HOME/gradle/
COPY --chown=gradle:gradle . /home/gradle/src

COPY . .

ARG REACT_APP_TOKEN
ENV REACT_APP_TOKEN $REACT_APP_TOKEN

RUN gradle clean npm_run_build copyTask build -x test --no-daemon || return 0

FROM eclipse-temurin:17-jdk-alpine
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
hostname: server-regions
container_name: server-regions
image: myapp
environment:
- REACT_APP_TOKEN=${REACT_APP_TOKEN}
restart: always
logging:
#limit logs to 200MB (4rotations of 50M each)
Expand All @@ -40,10 +42,11 @@ services:
build:
context: .
dockerfile: ./Dockerfile
args:
REACT_APP_TOKEN: abc123
ports:
- "8080:8080"
- "8090:8090"
env_file:
- frontend/.env

healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8090/actuator/health" ]
Expand Down
6 changes: 6 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
npm-debug.log
.DS_Store
.git
.gitignore
.env
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:20-alpine

WORKDIR /usr/src/app

COPY package.json ./
COPY package*.json ./

RUN npm install

Expand Down
Loading
Loading