Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue793 #795

Merged
merged 17 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ RUN \
dnf install -y fontconfig urw-fonts && \
dnf clean all

# node
#Install python dependencies
RUN dnf install -y python36 python3-pip
RUN alternatives --set python /usr/bin/python3
RUN alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
RUN pip install argparse requests psycopg2-binary==2.8.6
RUN dnf install -y initscripts

# node
ENV NPM_CONFIG_LOGLEVEL warn
ENV NODE_VERSION 14.15.1

Expand Down Expand Up @@ -45,18 +51,10 @@ WORKDIR $BUILD_PATH
RUN chmod u+x bin/*.sh
ENV PREPARE_MODULE_CONF_JSON=true
ENV PREPARE_CONFIG_FILES=true
ENV RUN_SYSTEM_TEST=true
ENV RUN_SYSTEM_TEST=false
ENV ACAS_HOME=$BUILD_PATH
RUN gulp execute:prepare_config_files

#Install python dependencies
USER root
RUN dnf install -y python36 python3-pip
RUN alternatives --set python /usr/bin/python3
RUN alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
RUN pip install argparse requests psycopg2-binary==2.8.6
RUN dnf install -y initscripts

USER runner

EXPOSE 3000
Expand Down
6 changes: 5 additions & 1 deletion app_api_template.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ startApp = ->

http.createServer(app).listen(app.get('port'), ->
console.log("ACAS API server listening on port " + app.get('port'))
console.log "Bootstrap being called"
bootstrap = require "./src/javascripts/ServerAPI/Bootstrap.js"
if bootstrap.main?
bootstrap.main()
bootstrap.main () ->
console.log "Bootstrap called successfully"
else
console.log "Bootstrap called successfully (no main found so script just required)"
)

csUtilities.logUsage("ACAS API server started", "started", "")
Expand Down
2 changes: 1 addition & 1 deletion bin/acas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ cd $ACAS_HOME

# Run Prepare config files as the compiled directory should be empty
if [ "$PREPARE_CONFIG_FILES" = "true" ]; then
gulp execute:prepare_config_files
node $ACAS_HOME/src/javascripts/BuildUtilities/PrepareConfigFiles.js
fi

#Get ACAS config variables
Expand Down
Loading