Web Development Container
Software Included
-
Apache2 (https://httpd.apache.org/)
-
Git (https://git-scm.com/)
-
MariaDB (https://mariadb.org/)
-
PHP (https://www.php.net/)
-
PHPMyAdmin (https://www.phpmyadmin.net/)
Build Web Development Docker Container
Before building the web devlopment Docker Container, we must clone the public GitHub repository. The web development GitHub repository contains all the requisite files required for building the web development Docker container for use on compute1.
-
Log onto compute1 (replacing
wustlkey
with your assigned WUSTL Key)
> ssh wustlkey@compute1-client-1.ris.wustl.edu
-
Clone the RIS web development Docker repository to
$HOME
on compute1
> cd $HOME && git clone https://github.com/nhatas/ris_webdev_docker_container
-
Build and push your Docker container to Docker Hub. Documentation on how to do this can be found here.
Submitting the Web Devlopment Job
-
Set the
MYSQL_PATH
environment variable to the path you wish to store your database files. In the example below the database files will be stored in the userās home folder.
> export MYSQL_PATH="$HOME/mysql"
Complete export MYSQL_PATH=
with a path to a folder you have access to. Do not leave this blank.
-
Set the
LSF_DOCKER_VOLUMES
environment variable to mount the location of your webserver files, as well as any other folders you wish to have access to inside of the docker container. Documentation on this environment variable can be found here.
> export LSF_DOCKER_VOLUMES="/storage1/fs1/${STORAGE_ALLOCATION}/Active/webserver/:/var/www/html/"
-
Submit the job using
bsub
and theLSF_DOCKER_PORTS
environment variable to allow web access to the Docker container. In the example below, port 8080 is used to access the Docker container. Documentation on this environment variable can be found here.
> LSF_DOCKER_PORTS="8080:8081" bsub -Is -R "select[port8080=1]" -q general-interactive -a 'docker(location-of-docker-image)' /bin/bash
-
Since LSF is running interactively, it will output the name of the host itās running on in the terminal.
-
The host will be the IP address needed to access the webserver files.
-
For example: <<Starting on compute1-exec-187.ris.wustl.edu>> translates to the IP being https://compute1-exec-187.compute.ris.wustl.edu:8080
-
Please see our documentation for more information on selecting a port.
-
Once connected, run a script to start the Apache 2 server and generate
MYSQL
configuration files.
> /app/script.sh
-
Access PHPMyAdmin by appending
/phpmyadmin
to the address of the host from step 3.
-
Using the example host IP from step 3, the address to access PHPMyAdmin would be: https://compute1-exec-187.compute.ris.wustl.edu:8080/phpmyadmin
-
The PHPMyAdmin username is root and there is no password.