Skip to content

Commit

Permalink
update hv docker db
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarciabriseno committed Sep 6, 2024
1 parent aeffc03 commit eb678e3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions compose/dockerfiles/db.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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 sunpy glymur matplotlib scipy mysqlclient
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

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 All @@ -19,12 +19,12 @@ RUN mkdir -p /tmp/jp2
RUN cp img/* /tmp/jp2
RUN <<EOF
MARIADB_ROOT_PASSWORD=helioviewer docker-entrypoint.sh mariadbd &
sleep 10
./headless_setup.sh
mariadb -phelioviewer -e "CREATE USER 'helioviewer'@'%' IDENTIFIED BY 'helioviewer'"
mariadb -phelioviewer -e "GRANT ALL ON helioviewer.* to 'helioviewer'@'%'"
sed 's!server = localhost!server=!g' settings/settings.example.cfg > settings/settings.cfg
sed -i 's!/mnt/data/!/tmp/!g' settings/settings.cfg
expect -c 'set timeout 600; spawn python3 downloader.py -d hv_soho -s "2023-12-01 00:00:00" -e "2023-12-01 01:00:00"; expect "Sleeping for 30 minutes"'
pkill mariadb
sleep 10 \
&& ./headless_setup.sh \
&& mariadb -phelioviewer -e "CREATE USER 'helioviewer'@'%' IDENTIFIED BY 'helioviewer'" \
&& mariadb -phelioviewer -e "GRANT ALL ON helioviewer.* to 'helioviewer'@'%'" \
&& sed 's!server = localhost!server=!g' settings/settings.example.cfg > settings/settings.cfg \
&& sed -i 's!/mnt/data/!/tmp/!g' settings/settings.cfg \
&& expect -c 'set timeout 600; spawn python3 downloader.py -d hv_soho -s "2023-12-01 00:00:00" -e "2023-12-01 01:00:00"; expect "Sleeping for 30 minutes"' \
&& pkill mariadb
EOF

0 comments on commit eb678e3

Please sign in to comment.