🐳 move to new + simple Dockerfile

This commit is contained in:
Philipp Dormann 2020-12-20 18:09:58 +01:00
parent 2cdd1cd961
commit 9202b473f5
3 changed files with 20 additions and 10 deletions

View File

@ -1,6 +1,12 @@
FROM node:15.4.0-alpine3.12
WORKDIR /app
RUN npm i -g pnpm
COPY package.json index.html ./
RUN pnpm i
COPY src ./src
COPY public ./public
RUN pnpm run build
# final image
FROM fholzer/nginx-brotli:v1.19.1
ENV APP_CONF="config={}"
# TODO: buildstep
COPY ./dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf.template
# COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=0 /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf

View File

@ -1,9 +1,8 @@
version: '3'
version: "3"
services:
httpd:
build: .
environment:
- APP_CONF=config={"baseUrl":"http://localhost:8081"}
command: ["sh", "-c", "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"]
volumes:
- ./dev.env.js:/usr/share/nginx/html/env.js
ports:
- 4050:80

5
env.sample.js Normal file
View File

@ -0,0 +1,5 @@
const config = {
baseurl: 'https://dev.lauf-fuer-kaya.de',
fallback_username: 'admin',
fallback_password: '72fpTzsev4xUu78QPs2FCbwZ3'
};