Skip to content

Commit 3fcf3d9

Browse files
authored
Merge pull request #197 from corrupt/applesilicon
Applesilicon
2 parents 332b28c + 1f8812f commit 3fcf3d9

3 files changed

Lines changed: 35 additions & 9 deletions

File tree

Dockerfile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
FROM node:18.7-alpine AS build
2+
23
WORKDIR /usr/src/app
34
COPY package.json package-lock.json ./
4-
RUN npm install
5+
RUN apk add --upgrade python3 build-base \
6+
&& npm install
57
COPY . .
68
RUN npm run build
79

810
FROM wurstbrot/dsomm-yaml-generation as yaml
911

10-
FROM bitnami/nginx:latest
11-
COPY --from=yaml /var/www/html/src/assets/YAML/generated/generated.yaml /app/src/assets/YAML/generated/generated.yaml
12-
COPY nginx/location.conf /opt/bitnami/nginx/conf/bitnami/location.conf
13-
COPY --from=build /usr/src/app/dist/dsomm/ /app
12+
FROM nginx:alpine
13+
14+
RUN chown -R nginx:nginx /var/cache/nginx \
15+
&& chown -R nginx:nginx /var/log/nginx \
16+
&& touch /var/run/nginx.pid \
17+
&& chown -R nginx:nginx /var/run/nginx.pid
18+
19+
COPY --from=yaml ["/var/www/html/src/assets/YAML/generated/generated.yaml", "/usr/share/nginx/html/assets/YAML/generated/generated.yaml"]
20+
COPY ["nginx/default.conf", "/etc/nginx/conf.d/"]
21+
COPY --from=build ["/usr/src/app/dist/dsomm/", "/usr/share/nginx/html/"]
22+
23+
USER nginx

nginx/default.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
server {
2+
listen 8080;
3+
server_name localhost;
4+
5+
#access_log /var/log/nginx/host.access.log main;
6+
7+
location / {
8+
root /usr/share/nginx/html;
9+
try_files $uri $uri/ /index.html =404;
10+
}
11+
12+
#error_page 404 /404.html;
13+
14+
# redirect server error pages to the static page /50x.html
15+
#
16+
error_page 500 502 503 504 /50x.html;
17+
location = /50x.html {
18+
root /usr/share/nginx/html;
19+
}
20+
}

nginx/location.conf

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)