Skip to content

Commit f5c6be8

Browse files
committed
enable installation with https protocol
1 parent e6b0819 commit f5c6be8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

default.config

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ IMPORT_DIR=/path/to/_gnom/import
44

55
# Server
66
SERVER_ADRESS=127.0.0.1
7+
PROTOCOL=http
78

89
# INITIAL USER
910
INITIAL_USER_USERNAME=admin

setup.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ docker exec -u www-data $FILE_SERVER_CONTAINER_NAME php occ files:scan --all
8686
## Reactapp
8787
echo "Build react docker container and install dependencies..."
8888
# envs
89-
echo "REACT_APP_API_ADRESS=http://${SERVER_ADRESS}:${API_PORT}" > ./react-frontend/.env
90-
echo "REACT_APP_FILE_SERVER_ADRESS=http://${SERVER_ADRESS}:${FILE_SERVER_PORT}" >> ./react-frontend/.env
91-
echo "REACT_APP_JBROWSE_ADRESS=http://${SERVER_ADRESS}:${JBROWSE_PORT}" >> ./react-frontend/.env
89+
echo "REACT_APP_API_ADRESS=${PROTOCOL}://${SERVER_ADRESS}:${API_PORT}" > ./react-frontend/.env
90+
echo "REACT_APP_FILE_SERVER_ADRESS=${PROTOCOL}://${SERVER_ADRESS}:${FILE_SERVER_PORT}" >> ./react-frontend/.env
91+
echo "REACT_APP_JBROWSE_ADRESS=${PROTOCOL}://${SERVER_ADRESS}:${JBROWSE_PORT}" >> ./react-frontend/.env
9292

9393
# build
9494
cd ./react-frontend
@@ -107,11 +107,11 @@ cd ./flask-backend
107107
docker build -t gnom/flask .
108108
# start
109109
echo "Start ${API_CONTAINER_NAME} container..."
110-
docker run --name $API_CONTAINER_NAME --network ${DOCKER_NETWORK_NAME} --restart on-failure:10 -d -p ${API_PORT}:${API_PORT} -v ${DATA_DIR}/taxa:/flask-backend/data/storage/taxa -v ${IMPORT_DIR}:/flask-backend/data/import -e RABBIT_WORKER_COUNT=${RABBIT_WORKER_COUNT} -e MYSQL_HOST=${MYSQL_CONTAINER_NAME} -e INITIAL_USER_USERNAME=${INITIAL_USER_USERNAME} -e INITIAL_USER_PASSWORD=${INITIAL_USER_PASSWORD} -e MYSQL_CONTAINER_NAME=${MYSQL_CONTAINER_NAME} -e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} -e API_ADRESS=http://${API_ADRESS} -e API_PORT=${API_PORT} -e FILE_SERVER_ADRESS=${FILE_SERVER_ADRESS} -e JBROWSE_ADRESS=${JBROWSE_ADRESS} -e RABBIT_CONTAINER_NAME=${RABBIT_CONTAINER_NAME} gnom/flask
110+
docker run --name $API_CONTAINER_NAME --network ${DOCKER_NETWORK_NAME} --restart on-failure:10 -d -p ${API_PORT}:${API_PORT} -v ${DATA_DIR}/taxa:/flask-backend/data/storage/taxa -v ${IMPORT_DIR}:/flask-backend/data/import -e RABBIT_WORKER_COUNT=${RABBIT_WORKER_COUNT} -e MYSQL_HOST=${MYSQL_CONTAINER_NAME} -e INITIAL_USER_USERNAME=${INITIAL_USER_USERNAME} -e INITIAL_USER_PASSWORD=${INITIAL_USER_PASSWORD} -e MYSQL_CONTAINER_NAME=${MYSQL_CONTAINER_NAME} -e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} -e API_ADRESS=${PROTOCOL}://${API_ADRESS} -e API_PORT=${API_PORT} -e FILE_SERVER_ADRESS=${FILE_SERVER_ADRESS} -e JBROWSE_ADRESS=${JBROWSE_ADRESS} -e RABBIT_CONTAINER_NAME=${RABBIT_CONTAINER_NAME} gnom/flask
111111
cd ..
112112

113113
echo "Waiting for flask server to start..."
114-
until [ $(curl --write-out '%{http_code}' --silent --output /dev/null http://${API_ADRESS}:${API_PORT}/connectionTest) -eq 200 ]; do
114+
until [ $(curl --write-out '%{http_code}' --silent --output /dev/null ${PROTOCOL}://${API_ADRESS}:${API_PORT}/connectionTest) -eq 200 ]; do
115115
printf "."
116116
sleep 3;
117117
done;

0 commit comments

Comments
 (0)