-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
The iNProve server can be deployed as a normal Docker image.
Alternatively, you can also host it on fly.io.
Fly.io's free plan permits hosting the necessary PostgreSQL database, as well as the server. The steps below assumes you
have setup the fly
CLI and is authenticated.
-
Setup PostgreSQL database
fly postgres create
-
Setup server
A
fly.toml
file is included in this repository. You may choose to copy the file. This will create an app with the namenp-inprove-server
and uses Dockerfile to build.Do not deploy first.
fly launch --no-deploy --dockerfile build/docker/Dockerfile
-
Attach PostgreSQL database
In the command below,
np-inprove-postgres
is the name of the PostgreSQL database created in step one, but you can use any name.fly postgres attach -a np-inprove-server np-inprove-postgres
-
Setup secrets
By default, the precompiled binary supports either SQLite or PostgreSQL as the database driver.
In the provided
fly.toml
configuration file, the driver is set topostgres
.You may override this using the
INPROVE_DATABASE_DRIVERNAME
environment variable.fly secrets set INPROVE_APP_JWTALGORITHM="HS256" INPROVE_APP_JWTSIGNKEY="verysecure" INPROVE_DATABASE_DATASOURCENAME="host=<host> port=<port> user=<user> dbname=<database> password=<pass> sslmode=disable"
-
Deploy!
Deploy the server!
fly launch