-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 923 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 923 Bytes
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
FROM node:18-alpine as deps
WORKDIR /app
# Copy dependency-defining files
COPY package.json yarn.lock .yarnrc.yml /app/
COPY .yarn /app/.yarn
COPY packages/opendesign-env/package.json packages/opendesign-env/
COPY packages/opendesign-universal/package.json packages/opendesign-universal/
COPY packages/opendesign-react/package.json packages/opendesign-react/
COPY packages/docs/package.json packages/docs/
COPY packages/opendesign/package.json packages/opendesign/
# Install NPM packages
RUN corepack enable yarn \
&& yarn config set enableGlobalCache false \
&& yarn
RUN apk add --no-cache git
# Build the app
COPY . /app
RUN node build.js
FROM nginx
COPY --from=deps /app/dist /usr/share/nginx/html
# dokku apps:create odf
# dokku letsencrypt:enable odf
# dokku proxy:ports-add odf https:443:80
# dokku proxy:ports-remove odf https:443:5000
# docker build . --tag odf
# docker run --rm -it -p 3000:80 odf