-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the dockerfile now build the webassembly and calculates the checksums, docker run added to makefile, actions cleaning
- Loading branch information
1 parent
755867a
commit d621faa
Showing
5 changed files
with
22 additions
and
72 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
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,8 +1,19 @@ | ||
FROM nginx:alpine | ||
FROM golang:alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY ./web /app | ||
COPY . . | ||
|
||
RUN GOOS=js GOARCH=wasm go build -o ./web/mykeys.wasm ./cmd/webassembly/main.go | ||
RUN sha256sum ./web/mykeys.wasm > ./web/sha256_checksums.txt | ||
RUN cp /usr/local/go/misc/wasm/wasm_exec.js ./web/wasm_exec.js | ||
RUN sha256sum ./web/wasm_exec.js >> ./web/sha256_checksums.txt | ||
|
||
FROM nginx:alpine as production | ||
|
||
WORKDIR /webapp | ||
|
||
COPY --from=builder /app/web /webapp | ||
COPY ./build/nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 8080 | ||
EXPOSE 80 |
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
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ http { | |
server_name _; | ||
server_tokens off; | ||
|
||
root /app; | ||
root /webapp; | ||
gzip_static on; | ||
} | ||
} |
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