Deploying to your own laptop
If you want to deploy RAP4 to your laptop, this chapter tells you how.
This example has worked on my Macbook. If you have a different computer, you may either change the commands below to the commands of your own computer or set up a virtual Linux machine on your laptop.

Prerequisites

You need docker. Follow the instructions onhttps://docs.docker.com/.
You need git. Follow the instructions on https://github.com/git-guides/install-git.
You need to use a command-line, you need permission to install software on your laptop and you need to be connected to the Internet.
Start in your command-line interface (CLI, terminal on a macbook) and go to (or make) a working directory from which you want to keep Git repositories.

Obtaining the files we need

Import the required files from Github (note: you may need to log in into Github):
1
git clone https://github.com/AmpersandTarski/RAPinstall
Copied!
Expect roughly this response:
1
Cloning into 'RAPinstall'...
2
remote: Enumerating objects: 19, done.
3
remote: Counting objects: 100% (19/19), done.
4
remote: Compressing objects: 100% (17/17), done.
5
remote: Total 19 (delta 2), reused 14 (delta 0), pack-reused 0
6
Unpacking objects: 100% (19/19), done.
Copied!
Now go to the directory from which to install RAP:
1
cd RAPinstall
Copied!
You need to create a proxy network to let RAP communicate with your browser (no problem if it already exists; docker will tell you with an appropriate message)
1
docker network create proxy
Copied!
When docker has made the network, it tells you something like this:
1
3f9552a7506ac5f2b5d9fcb158edae82f9f64e4e3d6b093916d624d118ba342a
Copied!
Now spin up RAP4 (note: in older versions of docker use docker-compose instead of docker compose. The difference is just a hyphen):
1
docker compose up -d
Copied!
The first time you spin up RAP4, docker will spontaneously download the images it needs. That generates substantial output. At the end docker will show the containers that have been started:
1
⠿ Network rapinstall_db Created 3.9s
2
⠿ Network rapinstall_default Created 3.9s
3
⠿ Volume "rapinstall_rap4-data" Created 0.0s
4
⠿ Volume "rapinstall_db-data" Created 0.0s
5
⠿ Volume "rapinstall_letsencrypt" Created 0.0s
6
⠿ Container traefik Started 7.1s
7
⠿ Container rap4-db Started 5.2s
8
⠿ Container rapinstall_dummy-student-prototype_1 Started 5.1s
9
⠿ Container phpmyadmin Started 12.7s
10
⠿ Container rap4 Started 12.9s
11
⠿ Container enroll Started
Copied!
Now, you need to "climb into" the rap4 container to execute one command manually:
1
docker exec -it rap4 bash
Copied!
You now get a prompt like [email protected]:/usr/local/project# that indicates that you are inside the rap4 container. Once inside, you need to give the following chmod command to enable RAP to generate prototypes.
1
chmod 666 /var/run/docker.sock
Copied!
Finally, type exit to leave the rap4-container and return to the CLI of your laptop.
Now you are done. Just check whether everything works:
Type localhost in the URL-field of your browser, to see if RAP4 has started. You should see this:
Note that RAP runs on the insecure http:// instead of https://. This is not a problem if you keep your laptop safe from outsiders' trespassing. If you deploy to a server, you need a secure setup.
You will find that the database is accessible on http://phpmyadmin.localhost
The demonstration application, Enrollment, is accessible on http://enroll.localhost
Export as PDF
Copy link