Skip to content

Commit

Permalink
updated docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorezz committed May 20, 2024
1 parent bd46862 commit 1e953e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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;"]
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ services:
env_file:
- .env
ports:
- "8100:80"
- "3000:8080"
stdin_open: true
tty: true

0 comments on commit 1e953e0

Please sign in to comment.