aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-01-13 17:49:50 +0000
committers-ol <s+removethis@s-ol.nu>2022-01-13 18:00:23 +0000
commit19ea970958eea3dc688c631f7ac0ec7818f2689f (patch)
tree549bb3ad73d392a1ec50d1a34fd8cf8d7809267a /Dockerfile
parentMerge server and client repositories (diff)
downloadfedidag-19ea970958eea3dc688c631f7ac0ec7818f2689f.tar.gz
fedidag-19ea970958eea3dc688c631f7ac0ec7818f2689f.zip
(re)Dockerize!
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 17 insertions, 10 deletions
diff --git a/Dockerfile b/Dockerfile
index bf61a4a..502a4b7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,18 @@
-FROM node AS build-env
-WORKDIR /build
-COPY package.json /build/
-RUN npm i
-COPY . /build/
-RUN npm run build
+FROM node AS client-env
+WORKDIR /client
+COPY client/package.json /client/
+RUN yarn
+COPY client/ /client/
+RUN yarn build
-FROM nginx:alpine
-COPY nginx.conf.template /etc/nginx/templates/default.conf.template
-COPY --from=build-env /build/dist /usr/share/nginx/html
-RUN chmod 555 -R /usr/share/nginx/html
+FROM node
+WORKDIR /server
+COPY server/package.json /server/
+RUN yarn
+COPY server/ /server/
+RUN yarn build
+
+COPY --from=client-env /client/dist/ /server/static/
+
+EXPOSE 3000
+CMD ["node", "main.js"]