-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created Dockerfile and fly config + fixed Flexbox issue
- Loading branch information
1 parent
309d840
commit c6f745a
Showing
11 changed files
with
390 additions
and
33 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 +1,2 @@ | ||
target | ||
build |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM rust:latest as wasm-build | ||
|
||
RUN mkdir -p /usr/build/ | ||
WORKDIR /usr/build/ | ||
|
||
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
COPY . . | ||
|
||
WORKDIR /usr/build/harper-wasm | ||
RUN wasm-pack build --release | ||
|
||
FROM node:slim as node-build | ||
|
||
RUN mkdir -p /usr/build/ | ||
WORKDIR /usr/build/ | ||
|
||
RUN mkdir harper-wasm | ||
|
||
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg | ||
COPY web web | ||
COPY alice.txt . | ||
|
||
WORKDIR /usr/build/web | ||
|
||
RUN yarn install && yarn build | ||
|
||
FROM node:slim | ||
|
||
COPY --from=node-build /usr/build/web/build /usr/build/web/build | ||
COPY --from=node-build /usr/build/web/package.json /usr/build/web/package.json | ||
COPY --from=node-build /usr/build/web/yarn.lock /usr/build/web/yarn.lock | ||
COPY --from=node-build /usr/build/web/node_modules /usr/build/web/node_modules | ||
|
||
WORKDIR /usr/build/web | ||
|
||
RUN yarn install | ||
|
||
ENV HOST=0.0.0.0 | ||
ENV PORT=3000 | ||
|
||
ENTRYPOINT ["node", "build"] |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
app = "writewithharper" | ||
primary_region = "den" | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 1 | ||
processes = ["app"] | ||
|
||
[[vm]] | ||
cpu_kind = "shared" | ||
cpus = 1 | ||
memory_mb = 256 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* |
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
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
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
Oops, something went wrong.