Skip to content

Commit

Permalink
disable beta ico patch node version on Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
adri1s committed Jan 10, 2024
1 parent 68fa5d0 commit 83c9e99
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ assets/
docker-compose.yml
docker.yml
Dockerfile
Dockerfile_dev
LICENSE
README.md
README.md
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM node:lts-alpine as build-stage
FROM node:16-alpine
WORKDIR /app
ENV VUE_APP_API_URL='http://<STRAPI_URL>/graphql'
WORKDIR /app

COPY package.json ./
RUN npm install -g http-server
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

EXPOSE 8080
CMD [ "http-server", "dist" ]

# étape de production
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
# PATCH WIP for regenerator-runtime
#FROM nginx:stable-alpine as production-stage
#COPY --from=build-stage /app/dist /usr/share/nginx/html
#COPY nginx.conf /etc/nginx/conf.d/default.conf
#EXPOSE 80
#CMD ["nginx", "-g", "daemon off;"]
14 changes: 14 additions & 0 deletions Dockerfile_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:16-alpine

ENV VUE_APP_API_URL='http://<STRAPI_URL>/graphql'
WORKDIR /app

RUN npm install -g http-server
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

EXPOSE 8080
CMD [ "http-server", "dist" ]
#CMD [ "npm", "run", "serve" ]
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: '3.7'

services:
app-prod:
container_name: app-prod
build: .
build:
context: .
dockerfile: Dockerfile_dev
ports:
- '8080:80'
- '8080:8080'
6 changes: 2 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@
<router-link to="/tickets" class="nav-link link sec-link" id="ticketLink">
<b-icon-bookmarks></b-icon-bookmarks>
<span class="ml-3 align-top" style="font-size:1.2rem;">Tickets</span>
<b-badge pill variant="secondary" class="align-center ml-3">beta</b-badge>
</router-link>
</li>
<li class="nav-item graph" v-if="graph || backups">
<router-link to="/monitoring" class="nav-link link sec-link" id="graphLink" style="" >
<b-icon-graph-up></b-icon-graph-up>
<span class="ml-3 align-top" style="font-size:1.2rem;">Monitoring</span>
<b-badge pill variant="secondary" class="align-center ml-3">beta</b-badge>
</router-link>
</li>
</ul>
Expand All @@ -87,7 +85,7 @@
<footer class="footer py-3 bg-light">
<div class="container">
<span v-html="footerText"></span>
<span class="mx-3">Dashboard PG3 - 0.85</span>
<span class="mx-3">Dashboard PG3 - 0.86</span>
</div>
</footer>
</b-col>
Expand Down Expand Up @@ -443,4 +441,4 @@ a.active, a.sec-link.router-link-active, a.link.router-link-exact-active {
.form-control::placeholder {
color: var(--light-gray) !important;
}
</style>
</style>

0 comments on commit 83c9e99

Please sign in to comment.