-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ services: | |
env_file: | ||
- .env | ||
ports: | ||
- "8100:80" | ||
- "3000:8080" | ||
stdin_open: true | ||
tty: true |