-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.platform.app.yaml
37 lines (31 loc) · 915 Bytes
/
.platform.app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: app
type: golang:1.10
hooks:
build: |
set -e
curl -o /tmp/rust.sh https://sh.rustup.rs
chmod +x /tmp/rust.sh
/tmp/rust.sh -y --default-toolchain nightly
. ~/.cargo/env
rustup target add wasm32-unknown-unknown
cargo install cargo-web
cargo build --release -p backend
cargo web build --release -p frontend --target wasm32-unknown-unknown
rm -rf backend
rm -rf frontend
mkdir static
mv target/release/backend .
mv target/wasm32-unknown-unknown/release/frontend.js target/wasm32-unknown-unknown/release/frontend.wasm static
rm -rf target
web:
upstream:
socket_family: tcp
protocol: http
commands:
start: |
ROCKET_ENV=prod ROCKET_PORT=$PORT ./backend
locations:
/:
root: static
passthru: true
disk: 1024