Deploy Production
For the latest binaries visit our Github releases, and `unzip`, e.g, using:
```
$ unzip anyplace_<version>.zip
```
Or simply follow the standard `sbt` instructions after cloning the project.
This is now required for security purposes.
Generate one using the sbt shell
(inside IntelliJ):
playGenerateSecret
[Read more](https://www.playframework.com/documentation/2.8.x/ApplicationSecret).
3. Update configuration:
Configuration is split amongst these files:
Private configuration. Never share online. Create this file by duplicating app.private.example.conf and adapting as necessary.
-
application.secret
- Generated from Step 2. -
server.address
- The URL the server is running on. -
password.salt
- used for password encryption -
password.pepper
- used for password encryption -
filesystem settings (optional):
floorPlansRootDir
: directory of the floorplansradioMapRawDir
: directory for the raw radiomap dataradioMapFrozenDir
: directory for the frozen radiomapstilerRootDir
: directory of the tiler
app.base.conf
: put the base configuration. Don't reference any variables as it is used by build.sbt.
Contains the remaining of the Play configuration.
4. Install tiler dependencies:
Unix/Linux:
bash # LINUX / MACOSX $ cd anyplace_v3/bin $ chmod +x anyplace $ ./anyplace (alternatively use: $ nohup ./anyplace > anyplace.log 2>&1 ) # To stop press Ctrl-C or kill the respective process
**Windows**:
```bash
$ Go to the folder you unzipped in the prior step, then go to "bin"
$ Double click anyplace_v3.bat
# To stop press Ctrl-C or kill the respective process through the task manager
```
Setup SSL from an external authority: SETUP_SSL.md
-
Install a free certificate from letsencrypt.org on your Anyplace Server to obtain a secure https connection. SSL is only optional for web functionality. For Android, SSL is a prerequisite!
-
(Optional) Install a free load balancer from HAProxy to scale your installation to multiple Anyplace servers. In case of Anyplace cluster configuration, please install the certificate on the Load Balancer.
Deploy Development
Instead of pushing compiling and testing everything on a local machine, these set of scripts send the code changes to a remote machine. Those are then compile remotely
The below scripts run locally and sync the local files to a remote.
There needs to be some remote scripts as well:
- one that does
sbt "run PORT"
- three that compile the web apps and watch for changes:
grunt
(for viewer, viewerCampus, and architect)- see ./public
Create deploy/config.sh
from deploy/config.example.sh
Pushes the app.private.remote.conf, which contains the passwords, etc.
See ./public for more.
Must run remotely.
./deploy/watchdog.sh
can do this automatically.
Watches for file changes and automatically calls sync.sh
Wrapper over push_code.sh Also makes a curl request to trigger an automatic recompilation of the sources (sbt).
Pushes any relevant Scala or JS code.
sed -i 's/\r$//' *.sh
# ignore new changes in commits
git update-index --assume-unchanged config.sh push_code.sh watchdog.sh sync.sh
Local Deployment
Just open a browser and test the following URLs:
$ http://localhost:9000/api/version
You can obviously setup the service on an IP/Domain name by configuring the underlying Operating System with standard unix, mac or windows configurations.
For the compilation of the web apps (architect, viewer, viewerCampus), please see this instructions:
You can do so by issuing the command:
sbt clean compile dist
This will compile swagger output also.
4. DOCKER (deprecated)
Docker Deployment (outdated)
The backend's codebase has changed significantly. All of it was rewritten to MongoDB, dependencies has changed, and the docker image is now outdated.The backend now uses the latest version of
Play
, Scala
, sbt
, making its deployment easier.
Compilations are faster as incremental builds can now be used by the more recent sbt
version.
Any contributions from the community on docker
are welcome.