From 1e953e07774165eb0c9fcdb9624c3a9538e9e458 Mon Sep 17 00:00:00 2001 From: Lorezz Date: Mon, 20 May 2024 17:00:23 +0200 Subject: [PATCH] updated docker file --- Dockerfile | 22 ++++++++++++++-------- docker-compose.yaml | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index f565c7a2..5fc1bb00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,20 @@ -FROM docker.io/node:18 as build-stage +FROM node:20-alpine3.19 WORKDIR /app -RUN apt-get update \ - && apt-get -y --no-install-recommends install golang-go=2:1.19~1 golang-src=2:1.19~1 +COPY package*.json ./ +RUN npm install -COPY . /app +COPY . . -RUN npm ci -RUN npm run build +RUN apk update && apk add go go-doc +RUN mkdir -p $(go env GOROOT)/misc/wasm +RUN cp /usr/share/doc/go/misc/wasm/wasm_exec.js $(go env GOROOT)/misc/wasm/wasm_exec.js -FROM docker.io/nginx:1 -COPY --from=build-stage /app/dist/ /usr/share/nginx/html +RUN npm run build:wasm +RUN npm run dev + +# FROM nginx:alpine +# COPY --from=build-stage /app/dist/ /usr/share/nginx/html +# EXPOSE 80 +# CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 366600cf..af70208c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,6 +11,6 @@ services: env_file: - .env ports: - - "8100:80" + - "3000:8080" stdin_open: true tty: true