From c49f0816c858c5bdf93509344cbf4c1076c0bc25 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sun, 14 Aug 2022 01:24:29 +0200 Subject: [PATCH] Test simplified Dockerfile, removed internal build --- Dockerfile | 38 +++++++++++++++++--------------------- nginx.conf | 4 ++-- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b5be91..54c3107 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/nginx.conf b/nginx.conf index 21226f0..e1274d7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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 / {