-
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.
- Loading branch information
1 parent
6c8c365
commit 1da0be8
Showing
7 changed files
with
926 additions
and
778 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,33 +1,30 @@ | ||
# pull base image | ||
ARG NODE_VERSION=latest | ||
FROM node:${NODE_VERSION} as build | ||
|
||
# ---- Base Node ---- | ||
FROM node:lts AS base | ||
# Create app directory | ||
WORKDIR /app | ||
|
||
# ---- Dependencies ---- | ||
FROM base AS dependencies | ||
COPY ./simple-kimai-kiosk/package.json ./simple-kimai-kiosk/package-lock.json ./ | ||
|
||
# set node environment | ||
ARG NODE_ENV=production | ||
ENV NODE_ENV $NODE_ENV | ||
|
||
# install dependencies | ||
# install app dependencies including 'devDependencies' | ||
RUN npm install | ||
|
||
COPY ./simple-kimai-kiosk ./ | ||
# ---- Copy Files/Build ---- | ||
FROM dependencies AS build | ||
WORKDIR /app | ||
COPY ./simple-kimai-kiosk /app | ||
# Build react/vue/angular bundle static files | ||
RUN npm run build | ||
|
||
RUN npx expo export -p web | ||
# --- Release ---- | ||
FROM nginx:latest AS release | ||
# Remove default nginx website | ||
RUN rm -rf /usr/share/nginx/html/* # is this needed? | ||
|
||
FROM nginx as production | ||
# Copy static files from build stage to nginx | ||
COPY --from=build /app/dist /usr/share/nginx/html/ | ||
|
||
# set data to use for Kimai integration | ||
ARG KIMAI_URL | ||
# CUSTOMER_NAME can be left blank if only one customer | ||
ARG CUSTOMER_NAME | ||
ARG PROJECT_NAME=Default | ||
ENV KIMAI_URL $KIMAI_URL | ||
ENV CUSTOMER_NAME $CUSTOMER_NAME | ||
ENV PROJECT_NAME $PROJECT_NAME | ||
# Copy nginx configuration file | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
RUN mkdir /app | ||
COPY --from=build /app/dist /app | ||
COPY ./nginx.conf /etc/nginx/nginx.conf | ||
CMD ["nginx", "-g", "daemon off;"] |
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,13 +1,13 @@ | ||
version: '2.4' | ||
|
||
services: | ||
simple_kimai_kiosk: | ||
image: simple_kimai_kiosk | ||
simple-kimai-kiosk: | ||
container_name: my-nginx-container | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "8080:80" | ||
|
||
volumes: | ||
notused: | ||
healthcheck: | ||
test: ["CMD", "curl", "--fail", "http://localhost:80"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 3 |
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.