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

Fix/env variables #53

Merged
merged 2 commits into from
Sep 19, 2024
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Hostname to use in helioviewer configuration
HV_HOST=localhost
API_HOST=localhost
API_PORT=8081
CLIENT_PORT=8080
CLIENT_PORT=8080
4 changes: 3 additions & 1 deletion compose/dockerfiles/db.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ FROM mariadb
WORKDIR /root
RUN apt update
RUN apt install -y python3 python3-pip python3-dev default-libmysqlclient-dev build-essential pkg-config expect
RUN python3 -m pip install --break-system-packages numpy==2.0.0 sunpy==5.1.4 glymur==0.13.4 matplotlib==3.9.1 scipy==1.14.0 mysqlclient
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN python3 -m pip install numpy==2.0.0 sunpy==5.1.4 glymur==0.13.4 matplotlib==3.9.1 scipy==1.14.0 mysqlclient


COPY api/install .
COPY compose/2021_06_01__00_01_21_347__SDO_AIA_AIA_171.jp2 img/2021_06_01__00_01_21_347__SDO_AIA_AIA_171.jp2
Expand Down
3 changes: 2 additions & 1 deletion compose/scripts/api_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ if [ ! -f $configfile ]; then
sed -i "s|/var/www/api.helioviewer.org/docroot/jp2|/tmp/jp2|" $tmpfile
mv $tmpfile $configfile

echo "acao_url[] = http://$HV_HOST" >> ${SETTINGS_DIR}/Config.ini
echo "acao_url[] = http://$HV_HOST:$CLIENT_PORT" >> ${SETTINGS_DIR}/Config.ini
echo "acao_url[] = http://127.0.0.1:$CLIENT_PORT" >> ${SETTINGS_DIR}/Config.ini
echo "acao_url[] = http://127.0.0.1" >> ${SETTINGS_DIR}/Config.ini
fi


Expand Down
4 changes: 2 additions & 2 deletions compose/scripts/webserver_dev_mode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
# then write the final edited config back to the config file.
configfile=/var/www/html/resources/js/Utility/Config.js
tmpconfig=/tmp/tmpconfig
sed "s|https://api.helioviewer.org|http://$HV_HOST:$API_PORT|" $configfile > $tmpconfig
sed "s|https://api.helioviewer.org|http://$API_HOST:$API_PORT|" $configfile > $tmpconfig
sed "s|https://helioviewer.org|http://$HV_HOST:$CLIENT_PORT|" $tmpconfig > $configfile
rm $tmpconfig

Expand All @@ -32,4 +32,4 @@ rebuild_on_change() {
rebuild_on_change &

source /etc/apache2/envvars
/usr/sbin/apache2 -DFOREGROUND
/usr/sbin/apache2 -DFOREGROUND
Loading