summaryrefslogtreecommitdiff
path: root/Bastillefile
blob: 168855a7b1d0e70c6288f6c00ead418749b71f2e (plain) (blame)
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
# TODO: user!
# Dirs and mounts
CMD mkdir -p /tmp/build
CMD mkdir -p /var/db/theglassyladies
FSTAB /zroot/theglassyladies /var/db/theglassyladies nullfs rw 0 0

# Prereqs
PKG nginx yarn sqlite3 rust

# Download sources
fetch -o /tmp http://192.168.1.50:3000/53hornet/theglassyladies/archive/master.tar.gz
CMD tar -xzvf /tmp/build/master.tar.gz -C /tmp/build

# Build backend
CMD CARGO_HOME=/tmp/build SQLITE3_LIB_DIR=/usr/local/lib SQLITE3_INCLUDE_DIR=/usr/local/include cargo install --root /usr/local --path /tmp/build/theglassyladies/dichroism

# Build frontend
CMD cp /var/db/theglassyladies/env.production /tmp/build/theglassyladies/iridescence/.env.production
CMD cd /tmp/build/theglassyladies/iridescence ; yarn ; yarn build
CMD mv /tmp/build/theglassyladies/iridescence/dist /var/www

# Config
OVERLAY usr
CMD chmod +x /usr/local/etc/rc.d/dichroism

# Cleanup
#CMD rm -rf /tmp/build
#CMD pkg remove -y yarn rust
#CMD pkg autoremove -y

# Launch
SYSRC nginx_enable=YES
SERVICE nginx start
SYSRC dichroism_enable=YES
SERVICE dichroism start