-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve front-end setup to match that of GHS
- Loading branch information
Showing
5 changed files
with
51 additions
and
41 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
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 |
---|---|---|
@@ -1,20 +1,28 @@ | ||
FROM node:18.18.2-alpine AS install | ||
ARG WEBSITE_PORT | ||
ARG SERVER_URL | ||
COPY ./dl4se-website/package*.json ./ | ||
RUN npm install | ||
FROM node:18.20.3-alpine AS build | ||
|
||
COPY ./dl4se-website . | ||
|
||
FROM install AS build | ||
ARG WEBSITE_PORT | ||
ARG SERVER_URL | ||
ARG NODE_ENV=production | ||
RUN apk update --quiet && \ | ||
apk add --no-cache --quiet gettext && \ | ||
envsubst < .env.template > .env && \ | ||
npm run build | ||
COPY <<-EOF .env | ||
VUE_APP_API_BASE_URL=http://localhost:8080/api | ||
EOF | ||
|
||
RUN npm ci && npm run build | ||
|
||
FROM nginx:1.26.0-alpine-slim AS production | ||
|
||
ENV TZ=UTC | ||
|
||
FROM nginx:1.25.3-alpine AS production | ||
COPY --from=build /dist /usr/share/nginx/html | ||
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY ./nginx/nginx.conf.template /etc/nginx/templates/default.conf.template | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
EXPOSE 80 8000 | ||
|
||
HEALTHCHECK \ | ||
--start-period=10s \ | ||
--interval=60s \ | ||
--timeout=30s \ | ||
--retries=5 \ | ||
CMD nc -z 127.0.0.1 80 || exit 1 |
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,19 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
sub_filter_once off; | ||
sub_filter_types application/javascript; | ||
sub_filter "http://localhost:8080" "${BASE_URL}"; | ||
} | ||
} | ||
|
||
server { | ||
listen 8000; | ||
server_name localhost; | ||
stub_status on; | ||
} |