-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronizing code from bitbucket repository (#14)
- Loading branch information
Showing
16 changed files
with
412 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
Dockerfile | ||
**/node_modules | ||
**/dist | ||
/gerrit | ||
/licenses | ||
.env* | ||
!.env.docker |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_API_URL=VITE_API_URL_PLACEHOLDER | ||
CFSB_API_URL=CFSB_API_URL_PLACEHOLDER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.13.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
FROM docker.io/library/node:21.4.0-bookworm | ||
COPY . /app | ||
# Build the Vue app | ||
FROM node:20 as build-stage | ||
WORKDIR /app | ||
RUN corepack enable pnpm && pnpm install && npx vue-tsc | ||
COPY package*.json ./ | ||
COPY .env.docker ./.env | ||
|
||
RUN npm install | ||
COPY ./ . | ||
RUN npm run build | ||
|
||
# Copy the compiled app in an NGINX contaier | ||
FROM nginx:alpine as production-stage | ||
RUN mkdir /app | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
|
||
# Executing the script at container runtime | ||
COPY set_env.sh /docker-entrypoint.d/ | ||
RUN chmod +x /docker-entrypoint.d/set_env.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
ROOT_DIR=/usr/share/nginx/html | ||
|
||
# Replace env vars in files served by NGINX | ||
for file in $ROOT_DIR/assets/*.js* $ROOT_DIR/index.html; | ||
do | ||
echo "Setting VITE_API_URL_PLACEHOlDER environment variables ${VITE_API_URL}" | ||
sed -i 's|VITE_API_URL_PLACEHOLDER|'${VITE_API_URL}'|g' $file | ||
|
||
echo "Setting CFSB_API_URL_PLACEHOLDER environment variables ${CFSB_API_URL}" | ||
sed -i 's|CFSB_API_URL_PLACEHOLDER|'${CFSB_API_URL}'|g' $file | ||
# Your other variables here... | ||
done | ||
|
||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.