Update containerfile
This commit is contained in:
parent
3ac0ecfec2
commit
e137305a03
2 changed files with 11 additions and 5 deletions
|
@ -12,18 +12,18 @@ WORKDIR /pw
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN cargo build --release
|
|
||||||
|
|
||||||
RUN cargo install wasm-pack
|
RUN cargo install wasm-pack
|
||||||
|
|
||||||
RUN wasm-pack build web/planetwars-rs --target web
|
RUN wasm-pack build web/planetwars-rs --target web
|
||||||
|
|
||||||
|
RUN cargo build --release && rm target/release/build target/release/deps -rf
|
||||||
|
|
||||||
WORKDIR /pw/web/pw-server
|
WORKDIR /pw/web/pw-server
|
||||||
|
|
||||||
RUN npm install --force && npm run build
|
RUN npm install --force && npm run build
|
||||||
|
|
||||||
RUN sed "s/module.exports=y;//" /pw/web/pw-server/.svelte-kit/output/client/_app/chunks/PlayerLog-c14926a0.js -i
|
RUN sed "s/module.exports=y;//" /pw/web/pw-server/.svelte-kit/output/client/_app/chunks/PlayerLog-*.js -i
|
||||||
|
|
||||||
WORKDIR /pw/planetwars-server
|
WORKDIR /pw
|
||||||
|
|
||||||
ENTRYPOINT ["../target/release/planetwars-server", "npm --prefix /pw/web/pw-server run preview -- --host"]
|
ENTRYPOINT ["/pw/start.sh"]
|
||||||
|
|
6
start.sh
Executable file
6
start.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd /pw/planetwars-server
|
||||||
|
|
||||||
|
../target/release/planetwars-server &
|
||||||
|
npm --prefix /pw/web/pw-server run preview -- --host
|
Loading…
Reference in a new issue