This Dockerized application contains all of the code you need to run PhaME as a standalone app. It has containers for the PhaME application, the web interface, Celery and Redis queues and a PostGREs database.
Docker and git are required.
-
clone the repo
git clone [email protected]:LANL-Bioinformatics/phame-app.git
-
cd to the project root directory
phame-app
cd phame-app
-
run
cp .envs/.local/.postgres_template phame-app/.envs/.local/.postgres
andcp .envs/.local/.email_template phame-app/.envs/.local/.email
.
Edit the.postgres
file and change the values forPOSTGRES_USER
andPOSTGRES_PASSWORD
-
Create docker containers.
docker-compose -f docker-compose-local.yml build
-
start docker
docker-compose -f docker-compose-local.yml up -d
-
initialize the database.
docker-compose -f docker-compose-local.yml run --rm web /bin/bash -c "python -c 'import database; database.init_db()'"
If all went well, you can go to localhost to see the phame webpage.
The user input files can require a lot of storage space. Use these instructions if you want to store the users' data on a data volume that is different from the main volume where the Docker container is created.
Go through steps 1-3 as for the local installation and then:
-
Run
mkdir -p /path/to/api/uploads
-
Update paths in
docker-compose-production.yml
to the volume where you want to store the users' upload files for thephame
andweb
containers.phame: volumes: - phame_data:/phame_api/media - /path/to/api/uploads:/api/static/uploads web: volumes: - phame_data:/phame_api/media - /path/to/api/uploads:/api/static/uploads
For example set volumes to
- /vol_d/api/uploads:/api/static/uploads
if you want to store the upload files on/vol_d
-
Create docker containers.
docker-compose -f docker-compose-production.yml build
-
start docker
docker-compose -f docker-compose-production.yml up -d
Browse to localhost:5555
to see the Flower Dashboard. Here you can see the status of the celery workers and their tasks.
You can look at projects run by other users if you create an admin
account and login to that account. Click on the
admin user icon in the upper right corner and select the username for the projects you would like to view.
If you would like users to receive email notifications with the error and execution logs when their projects have finished running:
-
Setup an email client. We use https://www.mailgun.com/
-
Edit the
.email
file and change the values forAPI_KEY
,EMAIL_URL
andSENDER
-
Edit
phame-app/api/config.py
and setSEND_NOTIFICATIONS = True