Skip to content

Commit f6d57e4

Browse files
committed
moved setup parts into dockerfiles
1 parent 51a34c1 commit f6d57e4

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

fileserver/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM httpd:2.4
2-
FROM nextcloud:23.0.0-apache
2+
FROM nextcloud:23.0.2-apache
33

44
RUN apt update
55
ARG DEBIAN_FRONTEND=noninteractive

jbrowse/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM httpd:2.4
33
RUN apt update
44
ARG DEBIAN_FRONTEND=noninteractive
55
RUN apt install -y genometools samtools tabix nodejs npm python3 python3-pip
6+
RUN npm i -g @jbrowse/[email protected]
67
RUN pip3 install pika
78

89
RUN mkdir -p /usr/local/apache2/htdocs/assemblies

setup.sh

+3-15
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,25 @@ until [ $(curl --write-out '%{http_code}' --silent --output /dev/null ${SERVER_
6666
done;
6767
echo ""
6868

69+
# setup nextcloud defaults
70+
echo "Remove default nextcloud files/apps and set up external storage..."
6971
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ app:install files_external
7072
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ app:enable files_external
7173
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ files_external:create -c datadir=/var/www/data "GnomData" 'local' null::null
7274
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ files_external:create -c datadir=/var/www/import "GnomImport" 'local' null::null
7375
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ app:disable password_policy
7476
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ app:disable photos
75-
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ app:install announcementcenter
76-
77-
# setup nextcloud defaults
78-
echo "Remove default nextcloud files and setup group folders..."
7977
docker exec $FILE_SERVER_CONTAINER_NAME bash -c "rm -r /var/www/html/core/skeleton/*"
8078
docker exec $FILE_SERVER_CONTAINER_NAME bash -c "rm -r /var/www/html/data/$INITIAL_USER_USERNAME/files/*"
8179

8280
# reindex
8381
echo "Reindex nextcloud directories..."
8482
docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ files:scan --all
8583

86-
docker exec -it $FILE_SERVER_CONTAINER_NAME python3 /usr/local/j_listener/main.py &
87-
8884
# ============================================ #
8985

9086
## Reactapp
91-
echo "Build reactapp docker container and install dependencies..."
87+
echo "Build react docker container and install dependencies..."
9288
# envs
9389
echo "REACT_APP_API_ADRESS=http://${SERVER_ADRESS}:${API_PORT}" > ./react-frontend/.env
9490
echo "REACT_APP_FILE_SERVER_ADRESS=http://${SERVER_ADRESS}:${FILE_SERVER_PORT}" >> ./react-frontend/.env
@@ -127,17 +123,9 @@ cd ./jbrowse
127123
docker build -t gnom/jbrowse .
128124
echo "RABBIT_CONTAINER_NAME=${RABBIT_CONTAINER_NAME}" > .env
129125
docker run --name $JBROWSE_CONTAINER_NAME --network $DOCKER_NETWORK_NAME --restart on-failure:10 -d -p 8082:80 -v ${DATA_DIR}/taxa:/flask-backend/data/storage/taxa --env-file .env gnom/jbrowse
130-
docker exec $JBROWSE_CONTAINER_NAME bash -c "npm i -g @jbrowse/[email protected]"
131126
docker exec $JBROWSE_CONTAINER_NAME bash -c "jbrowse create -f /usr/local/apache2/htdocs"
132127
cd ..
133128

134-
# setup missing directories
135-
docker exec $API_CONTAINER_NAME bash -c "mkdir -p /flask-backend/data/storage/assemblies"
136-
docker exec $API_CONTAINER_NAME bash -c "mkdir -p /flask-backend/data/storage/taxa/taxdmp"
137-
docker exec $API_CONTAINER_NAME bash -c "mkdir -p /flask-backend/data/import"
138-
docker exec $API_CONTAINER_NAME bash -c "touch /flask-backend/data/storage/taxa/tree.json"
139-
docker exec $API_CONTAINER_NAME bash -c "echo '{}' > /flask-backend/data/storage/taxa/tree.json"
140-
141129
# download taxa information from NCBI
142130
echo "Download taxa from NCBI..."
143131
docker exec $API_CONTAINER_NAME bash -c "wget -q https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip -P /flask-backend/data/storage/taxa && unzip -qq /flask-backend/data/storage/taxa/taxdmp.zip -d /flask-backend/data/storage/taxa/taxdmp"

0 commit comments

Comments
 (0)