Skip to content

Commit

Permalink
UI docker fix01 (#218)
Browse files Browse the repository at this point in the history
* remove dist/wfprev in basehref

* adding pub/wfprev path bck

* adding pub/wfprev path bck
  • Loading branch information
yzlucas authored Oct 18, 2024
1 parent 9f1f6b5 commit 6174a0d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mvn-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
if: ${{ inputs.COMPONENT_TYPE == 'client' }}
run: |
cd ${{ inputs.COMPONENT_TYPE }}/wfprev-war/src/main/angular
npm run build -- --configuration=production
npm run build -- --configuration=production --base-href=/pub/wfprev/
- name: Copy client built files to necessary folder
if: ${{ inputs.COMPONENT_TYPE == 'client' }}
Expand Down
1 change: 1 addition & 0 deletions client/wfprev-war/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN echo "Root directory contents before copy:" && ls -la /

# Copy the pre-built Angular app from the local machine into the container
COPY ./dist/wfprev ./dist/wfprev
# COPY src/main/angular/dist/wfprev ./dist/wfprev

# Log the contents of the /app directory after copying
RUN echo "App directory contents after copy:" && ls -la /app
Expand Down
4 changes: 2 additions & 2 deletions client/wfprev-war/backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ app.use(cors());
app.use(bodyParser.json());

// Serve static files from the Angular app
app.use(express.static(path.join(__dirname, 'dist/wfprev')));
app.use('/pub/wfprev', express.static(path.join(__dirname, 'dist/wfprev')));

// Send all requests to Angular app
app.get('/*', (req, res) => {
app.get('/pub/wfprev/*', (req, res) => {
res.sendFile(path.join(__dirname, 'dist/wfprev/index.html'));
});

Expand Down

0 comments on commit 6174a0d

Please sign in to comment.