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

UI docker fix01 #218

Merged
merged 3 commits into from
Oct 18, 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
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
Loading