-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (32 loc) · 2.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ARG NPM_SCRIPT="build"
ARG NODE_ENV="production"
#
# ███████╗██████╗ ██████╗ ███╗ ██╗████████╗███████╗███╗ ██╗██████╗
# ██╔════╝██╔══██╗██╔═══██╗████╗ ██║╚══██╔══╝██╔════╝████╗ ██║██╔══██╗
# █████╗ ██████╔╝██║ ██║██╔██╗ ██║ ██║ █████╗ ██╔██╗ ██║██║ ██║
# ██╔══╝ ██╔══██╗██║ ██║██║╚██╗██║ ██║ ██╔══╝ ██║╚██╗██║██║ ██║
# ██║ ██║ ██║╚██████╔╝██║ ╚████║ ██║ ███████╗██║ ╚████║██████╔╝
# ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝
#
FROM node:lts-alpine AS build-frontend
ARG NPM_SCRIPT
ARG NODE_ENV
ENV NODE_ENV=${NODE_ENV}
WORKDIR /build
COPY ./poc/package.json ./poc/package-lock.json ./
RUN npm ci
COPY ./poc/jsconfig.json ./poc/svelte.config.js ./poc/vite.config.js ./
COPY ./poc/index.html ./
COPY ./poc/public ./public
COPY ./poc/src ./src
RUN npm run ${NPM_SCRIPT}
# ███████╗██╗███╗ ██╗ █████╗ ██╗
# ██╔════╝██║████╗ ██║██╔══██╗██║
# █████╗ ██║██╔██╗ ██║███████║██║
# ██╔══╝ ██║██║╚██╗██║██╔══██║██║
# ██║ ██║██║ ╚████║██║ ██║███████╗
# ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝
#
FROM caddy:latest
COPY ./Caddyfile /etc/caddy/Caddyfile
COPY --from=build-frontend /build/dist /srv