Linux:
docker run \
-p 8080:8080 \
-v betterschool-api-data:/src/creds \
-e iv={INSERT RANDOM 16 CHARACTER STRING HERE} \
-e key={INSERT RANDOM 32 CHARACTER STRING HERE} \
--restart unless-stopped \
-d \
docker.chph.tk/cheesyphoenix/betterschool-api:latest
One liner:
docker run -p 8080:8080 -v betterschool-api-data:/src/creds -e iv={INSERT RANDOM 16 CHARACTER STRING HERE} -e key={INSERT RANDOM 32 CHARACTER STRING HERE} --restart unless-stopped -d docker.chph.tk/cheesyphoenix/betterschool-api:latest
Migrating from v1 to v2
The API has recently been redesigned from the ground up, if you were already hosting a v1 API follow these steps to migrate your old data:
docker run \
-p 8080:8080 \
-v {INSERT YOUR OLD VOLUME NAME HERE}:/app/creds \
-v {INSERT YOUR NEW VOLUME NAME HERE}:/app/data \
-e iv={INSERT SAME AS OLD 16 CHARACTER STRING HERE} \
-e key={INSERT SAME AS OLD 32 CHARACTER STRING HERE} \
--restart unless-stopped \
-d \
docker.chph.tk/cheesyphoenix/betterschool-api-v2:latest
After running this, it should automatically migrate your old data. After the migration is complete, the API should work as normal. You may also remove the old volume but this is not required.