mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2025-06-28 18:35:12 +00:00
Make webservice run as user and use tfwconnector pip package
This commit is contained in:
@ -3,7 +3,8 @@ FROM eu.gcr.io/avatao-challengestore/tutorial-framework
|
||||
# Install webservice dependencies
|
||||
RUN pip3 install Flask==1.0 \
|
||||
SQLAlchemy==1.2.7 \
|
||||
passlib==1.7.1
|
||||
passlib==1.7.1 \
|
||||
git+https://github.com/avatao-content/tfwconnector.git#subdirectory=python3
|
||||
|
||||
# Define variables to use later
|
||||
ENV TFW_SERVER_DIR="/srv/.tfw" \
|
||||
@ -21,7 +22,8 @@ ADD solvable/src/webservice/frontend-deps.tar ${TFW_WEBSERVICE_DIR}/static
|
||||
# Create IDE directory, symlink server source and give proper permissions to AVATAO_USER
|
||||
RUN mkdir -p ${TFW_IDE_WD} &&\
|
||||
ln -s ${TFW_WEBSERVICE_DIR}/user_ops.py ${TFW_IDE_WD} &&\
|
||||
chown -R ${AVATAO_USER}: ${TFW_IDE_WD} && chmod -R 755 ${TFW_IDE_WD}
|
||||
chown -R ${AVATAO_USER}: "${TFW_IDE_WD}" "${TFW_WEBSERVICE_DIR}" &&\
|
||||
chmod -R 755 "${TFW_IDE_WD}" "${TFW_WEBSERVICE_DIR}"
|
||||
|
||||
# Hide TFW related code from user
|
||||
RUN chown -R root:root ${TFW_SERVER_DIR} && chmod -R 700 ${TFW_SERVER_DIR}
|
||||
|
Reference in New Issue
Block a user