Test simplified Dockerfile, removed internal build

This commit is contained in:
2022-08-14 01:24:29 +02:00
parent 9cf2bb9bd8
commit c49f0816c8
2 changed files with 19 additions and 23 deletions

View File

@@ -1,31 +1,27 @@
FROM node:18-alpine3.15
FROM nginx:1.23.1
LABEL org.opencontainers.image.source https://github.com/kevinmidboe/seasoned
RUN apk update && apk add curl && apk add nginx && apk add openrc
# RUN mkdir -p /opt/seasoned
# WORKDIR /opt/seasoned
RUN mkdir -p /opt/seasoned/node_modules
WORKDIR /opt/seasoned
# COPY src /opt/seasoned/src
# COPY public /opt/seasoned/public
COPY public /usr/share/nginx/html
# COPY yarn.lock /opt/seasoned
# COPY package.json /opt/seasoned
# COPY server.ts /opt/seasoned
# COPY webpack.config.js /opt/seasoned
COPY nginx.conf /etc/nginx/conf.d/default.conf
# COPY tsconfig**.json /opt/seasoned/
COPY src /opt/seasoned/src
COPY public /opt/seasoned/public
COPY yarn.lock /opt/seasoned
COPY package.json /opt/seasoned
COPY server.ts /opt/seasoned
COPY webpack.config.js /opt/seasoned
COPY nginx.conf /etc/nginx/http.d/default.conf
COPY tsconfig**.json /opt/seasoned/
# RUN chown -R node:node /opt/seasoned
RUN chown -R node:node /opt/seasoned
# USER node
USER node
# RUN yarn install
RUN yarn install
RUN yarn build
RUN rc-update add nginx
RUN rc-service nginx start
# RUN yarn build
EXPOSE 5000
CMD ["yarn", "start"]
# CMD ["yarn", "start"]

View File

@@ -3,7 +3,7 @@ server {
listen [::]:5000 default_server;
# server_name request.movie;
root /opt/seasoned/public;
root /usr/share/nginx/html;
gzip on;
gzip_types application/javascript;
@@ -20,7 +20,7 @@ server {
}
location /api {
proxy_pass https://request.movie/api;
proxy_pass http://request.movie;
}
location / {