@@ -11,19 +11,64 @@ As it has users with passwords, it should *only* be used through a secure HTTPS
## Setup
The server is available at `localhost:3000` by default. Please reverse proxy via nginx, Apache or something like that and use HTTPS as encryption, as the passwords have to be sent over the connection.
### Docker
Probably the easiest method is to use Docker. The docker image is available at `registry.eisfunke.com/software/wms-server:latest`.
Install Docker and Docker Compose, save this as `docker-compose.yaml` and then run `docker-compose up -d`. The wms-server should then be accessible at `localhost:3000`.
To add a user, run `docker-compose exec app /wms-server-ctl add-user USERNAME`.
### Compiling
You can compile the app yourself instead.
1. If you haven't already, [install Stack](https://haskell-lang.org/get-started)
* On POSIX systems, this is usually `curl -sSL https://get.haskellstack.org/ | sh`
2. Enter PostgreSQL user, password, database and host (default is user "wms", password "wms", database "wms" and host "localhost") in config/settings.yml.
2. Build: `stack build` (or install with `stack install` which copies the binaries to `.local/bin`)
3. Start: `stack exec wms-server`.
**Alternatively** you can download the latest prebuilt Linux binaries [here](https://git.eisfunke.com/software/wms-server/-/jobs/artifacts/master/download?job=build). The included config folder contains settings.yaml that can be used just like with the Stack install. Then start the server directly by `./wms-server`, or the ctl app with `./wms-server-ctl`.
A user can be added (and the first user has to be added manually) with `stack exec wms-server-ctl add-user USERNAME`. It will ask for a password. After that the web interface can be used to add further users.
This opens the server up at `localhost:3000` which you can then reverse-proxy. Remember to use HTTPS.
### Binaries
Further instructions to deploy the server in other ways (e.g. if you don't want to compile on the server or use FastCGI), see <https://www.yesodweb.com/book/deploying-your-webapp>.
Alternatively you can download the latest prebuilt Linux binaries [here](https://git.eisfunke.com/software/wms-server/-/jobs/artifacts/master/download?job=build). The included config folder contains settings.yaml that can be used just like with the Stack install.
Then start the server directly by `./wms-server`, or the ctl app with `./wms-server-ctl`.
A user can be added (and the first user has to) with `stack exec wms-server-ctl add-user USERNAME`. It will ask for a password.
This opens the server up at `localhost:3000`.
### Further instructions
Further instructions to deploy the server in other ways (e.g. if you don't want to compile on the server or use FastCGI), see <https://www.yesodweb.com/book/deploying-your-webapp>.