Web Development Container¶
Compute Resources
Have questions or need help with compute, including activation or issues? Follow this link.
Assumptions
The information on this page assumes that you have a knowledge base of using Docker to create images and push them to a repository for use. If you need to review that information, please see the links below.
storageN
The use of
storageN
within these documents indicates that any storage platform can be used.- Current available storage platforms:
storage1
storage2
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.Note
Please refer to our documentation for more information on the available home folder disk space.
> export MYSQL_PATH="$HOME/mysql"
Warning
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="/storageN/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
You are a member of multiple LSF User Groups
If you are a member of more than one compute group, you will be prompted to specify an LSF User Group with -G group_name or by setting the LSB_SUB_USER_GROUP variable.
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.
Version Control
Git
is available in the Docker container to track and commit changes to your web development files.