Skip to content

Commit

Permalink
report file upload for portal
Browse files Browse the repository at this point in the history
  • Loading branch information
avikdatta committed May 31, 2023
1 parent d4150a2 commit 7ed2323
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ tests/1__init__.py
aaa
facebook.ico
migration_docker_db.sh
static/*
celery_tmp/*
4 changes: 4 additions & 0 deletions app/pre_demultiplexing_data_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ class PreDeMultiplexingDataApi(ModelRestApi):
@protect()
def add_report(self):
try:
log.warn('received_res')
log.warn(f"Files: {request.files}")
log.warn(f"Data: {request.data}")
log.warn(f"Form: {request.form}")
if not request.files:
return self.response_400('No files')
json_data = request.form
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
# IMG_SIZE = (300, 200, True)

## report upload folder
REPORT_UPLOAD_PATH = "/static/reports/"
REPORT_UPLOAD_PATH = "/data/static/reports/"

# Theme configuration
# these are located on static/appbuilder/css/themes
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
webserver:
image: imperialgenomicsfacility/igfportal:v0.0.2.1
env_file: env
user: "${UID}:${GID}"
ports:
- 8080:8080
restart: unless-stopped
Expand All @@ -51,6 +52,7 @@ services:
- /home/vmuser/github/ssl:/SSL:ro
- ./static:/data/static:rw
- /home/vmuser/secrets/airflow_conf.json:/secret/airflow_conf.json:ro
- ./celery_tmp:/TMP_WORK_DIR:rw
container_name: webserver
command: ["flask run -h 0.0.0.0 -p 8080 --reload --debugger --without-threads"]
networks:
Expand All @@ -72,14 +74,14 @@ services:
- /home/vmuser/github/ssl:/SSL:ro
- /home/vmuser/github/IGFPortal/nginx.conf:/etc/nginx/nginx.conf:ro
- /tmp/nginx:/var/nginx/:rw
- ./static:/data/static:rw
container_name: nginx
restart: unless-stopped
networks:
- portal_network
celery_worker1:
image: imperialgenomicsfacility/igfportal:v0.0.2.1
env_file: env
user: "${UID}:${GID}"
logging:
driver: "json-file"
options:
Expand All @@ -94,6 +96,8 @@ services:
volumes:
- /home/vmuser/github/IGFPortal:/github/IGFPortal:ro
- /home/vmuser/secrets/airflow_conf.json:/secret/airflow_conf.json:ro
- ./celery_tmp:/TMP_WORK_DIR:rw
- ./static:/data/static:rw
container_name: celery_worker1
command: ["celery -A app.celery worker --loglevel=WARNING"]
networks:
Expand Down

0 comments on commit 7ed2323

Please sign in to comment.