This is a complete bundle of the Anax module REM server canax/remserver together with an Anax website. It can be used to quickly start up a standalone REM server for test and development.
The REM server provides a dummy REST API with dynamic content, useful for developing and testing REST applications.
Try the live service at rem.dbwebb.se.
The starting page contains the documentation on the REM server API and how to use it.
You can read the documentation on the sample installation site or unstyled through this Git repo in content/index.md
.
There are a few ways to get the REM server up and rolling.
Download this Git repo.
Install essential tools.
make install # Everything, including devtools
make install-production # Only essentials for production environment
Point your web browser to htdocs
and you should see the documentation.
Perform the same steps as in Install from Git repo.
Start a docker container that has Apache running. The file docker-compose.yaml
is prepared with an Anax image that can be used for development and tests.
docker-compose up remserver-dev
Point your web browser to http://localhost:10099/htdocs
and you should see the documentation.
There is a Docker image anax/dev:remserver
that has the REM server website installed and ready to run.
If you have downloaded this repo you can start it with docker-compose
from the repo root. It will use the setup you have in docker-compose.yml
.
docker-compose up remserver
Point your web browser to http://localhost:10099
and you should see the documentation.
The basic setup in docker-compose.yml
is like this.
version: "3"
services:
remserver:
image: anax/dev:remserver
ports: [ "10099:80" ]
You can start it anywhere where you have access to docker
. Run like this and map the container port 80 to the local host port 10099.
docker run -p 10099:80 anax/dev:remserver
Point your web browser to http://localhost:10099
and you should see the documentation.
If you want the REM server as a Anax module to be installed together with your own Anax installation, then you should install the module itself.
Read more on the module canax/remserver.
These are useful for development and hosting a production server.
This implies setting up its own Apache virtual host to run the website. The Git repo is used as source but copied to the production site, normally on the same machine on $HOME/htdocs/server-name/
.
First, perform the same steps as in Install from Git repo.
Then you setup the local environment on the host, to make it both a development server and a prodution server.
make etc-hosts # Create a entry in the /etc/hosts for local access.
make site-build # Create essential directories to run as local website.
make local-publish # Publish website to local host.
make virtual-host # Create files for the virtual host http configuration.
Once these steps are performed one can view the development/production server on the local host using http://local.rem.dbwebb.se/ where "rem.dbwebb.se" is the hostname configured in the Makefile.
Update the local installation when you update the files in the repo.
make local-publish # Publish website to local host.
Perform the steps above to "Install on a production server using http".
make ssl-cert-create # Create the HTTPS certificates.
make virtual-host-https # Upgrade from http to https apache virtual host config files.
You can always revert to HTTP, If you get in trouble with the HTTPS/SSL configuration.
make virtual-host # Create files for the virtual host http configuration.
Whenever you make changes to the repo you can update the production server by committing and pushing your changes and then update the production server through the following command.
make production-publish # Publish latest to the production server.
.
..: Copyright (c) 2017-2018 Mikael Roos ([email protected])