arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

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.

hashtag
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.

hashtag
Obtaining the files we need

Import the required files from Github (note: you may need to log in into Github):

Expect roughly this response:

Now go to the directory from which to install RAP:

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)

When docker has made the network, it tells you something like this:

Now spin up RAP4 (note: in older versions of docker use docker-compose instead of docker compose. The difference is just a hyphen):

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:

Now, you need to "climb into" the rap4 container to execute one command manually:

You now get a prompt like root@bc774265c8ef:/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.

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 , 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

deploy to a server
git clone https://github.com/AmpersandTarski/RAPinstall
Cloning into 'RAPinstall'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 19 (delta 2), reused 14 (delta 0), pack-reused 0
Unpacking objects: 100% (19/19), done.
cd RAPinstall
docker network create proxy
3f9552a7506ac5f2b5d9fcb158edae82f9f64e4e3d6b093916d624d118ba342a
docker compose up -d
 â ¿ Network rapinstall_db                           Created                                                                                                                                                                               3.9s
 â ¿ Network rapinstall_default                      Created                                                                                                                                                                               3.9s
 â ¿ Volume "rapinstall_rap4-data"                   Created                                                                                                                                                                               0.0s
 â ¿ Volume "rapinstall_db-data"                     Created                                                                                                                                                                               0.0s
 â ¿ Volume "rapinstall_letsencrypt"                 Created                                                                                                                                                                               0.0s
 â ¿ Container traefik                               Started                                                                                                                                                                               7.1s
 â ¿ Container rap4-db                               Started                                                                                                                                                                               5.2s
 â ¿ Container rapinstall_dummy-student-prototype_1  Started                                                                                                                                                                               5.1s
 â ¿ Container phpmyadmin                            Started                                                                                                                                                                              12.7s
 â ¿ Container rap4                                  Started                                                                                                                                                                              12.9s
 â ¿ Container enroll                                Started
docker exec -it rap4 bash
chmod 666 /var/run/docker.sock