Skip to content

Commit 97d19b1

Browse files
committed
changes to bugs
1 parent 9326fc5 commit 97d19b1

File tree

4 files changed

+23
-49
lines changed

4 files changed

+23
-49
lines changed

Dockerfile

+20-27
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
FROM tethysplatform/tethys-core:dev-py3.10-dj3.2 as base
22

3-
ARG MAMBA_DOCKERFILE_ACTIVATE=1
4-
5-
#############
6-
# ADD FILES #
7-
#############
8-
9-
COPY apps ${TETHYS_HOME}/apps
10-
COPY requirements/*.txt .
11-
12-
########################
13-
# INSTALL APPLICATIONS #
14-
########################
15-
RUN micromamba install --yes -c conda-forge --file requirements.txt && \
16-
cd ${TETHYS_HOME}/apps/tethysapp-geoglows_dashboard && tethys install -w -N -q && \
17-
cd ${TETHYS_HOME}/apps/ggst && tethys install -w -N -q && \
18-
cd ${TETHYS_HOME}/apps/gwdm && tethys install -w -N -q
19-
20-
21-
# Final Image Build
22-
FROM tethysplatform/tethys-core:dev-py3.10-dj3.2 as build
23-
243

254
ENV TETHYS_DOMAIN="localhost"
265
ENV TETHYS_THREDDS_PROTOCOL="http"
@@ -69,16 +48,30 @@ ENV THREDDS_TDS_PUBLIC_HOST=""
6948
ENV THREDDS_TDS_PRIVATE_HOST=""
7049

7150

51+
ARG MAMBA_DOCKERFILE_ACTIVATE=1
7252

73-
COPY --chown=www:www --from=base ${CONDA_HOME}/envs/${CONDA_ENV_NAME} ${CONDA_HOME}/envs/${CONDA_ENV_NAME}
74-
COPY config/apps/post_setup_gwdm.py ${TETHYS_HOME}
75-
COPY salt/ /srv/salt/
53+
#############
54+
# ADD FILES #
55+
#############
7656

77-
ARG MAMBA_DOCKERFILE_ACTIVATE=1
57+
COPY apps ${TETHYS_HOME}/apps
58+
COPY requirements/*.txt .
7859

79-
RUN rm -Rf ~/.cache/pip && \
60+
########################
61+
# INSTALL APPLICATIONS #
62+
########################
63+
RUN micromamba install --yes -c conda-forge --file requirements.txt && \
8064
micromamba install --yes -c conda-forge numpy==1.26.4 && \
81-
micromamba clean --all --yes
65+
micromamba clean --all --yes && \
66+
rm -Rf ~/.cache/pip && \
67+
cd ${TETHYS_HOME}/apps/tethysapp-geoglows_dashboard && tethys install -w -N -q && \
68+
cd ${TETHYS_HOME}/apps/ggst && tethys install -w -N -q && \
69+
cd ${TETHYS_HOME}/apps/gwdm && tethys install -w -N -q
70+
71+
72+
COPY config/apps/post_setup_gwdm.py ${TETHYS_HOME}
73+
COPY salt/ /srv/salt/
74+
8275

8376
EXPOSE 80
8477
CMD bash -c "salt-call --local state.apply -l info | tee /var/log/salt.log && bash run.sh"

salt/geoglows_dashboard.sls

+3-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{% set POSTGIS_SERVICE_NAME = salt['environ.get']('POSTGIS_SERVICE_NAME') %}
3030
{% set GS_SERVICE_NAME = salt['environ.get']('GS_SERVICE_NAME') %}
3131

32-
{% set DATA_FILE_DESTINATION = APPLICATION_PATH + '/workspaces/app_workspaces/hydrosos/streamflow/vpu_122' %}
32+
{% set DATA_FILE_DESTINATION = APPLICATION_PATH + '/workspaces/app_workspace/hydrosos/streamflow/vpu_122' %}
3333
{% set DATA_FILE_URL = 'https://geoglows-dashboard-data.s3.us-east-2.amazonaws.com/combined_all_data_122.nc' %}
3434

3535

@@ -64,16 +64,10 @@ VerifyFile:
6464
- require:
6565
- file: EnsureDirectoryExists
6666

67-
# DownloadFile:
68-
# cmd.run:
69-
# - name: wget -O {{ DATA_FILE_DESTINATION }}/combined_all_data_122.nc {{ DATA_FILE_URL }}
70-
# - shell: /bin/bash
71-
# - require:
72-
# - file: {{ DATA_FILE_DESTINATION }}
7367

7468
Initiate_Geoserver:
7569
cmd.run:
76-
- name: "tethys manage shell < {{ APPLICATION_PATH }}/init_geoserver.py"
70+
- name: "cd {{ APPLICATION_PATH }} && tethys manage shell < init_geoserver.py"
7771
- shell: /bin/bash
7872
- cwd: {{ APPLICATION_PATH }}
7973
- stream: True
@@ -82,7 +76,7 @@ Initiate_Geoserver:
8276

8377
Initiate_River_Tables:
8478
cmd.run:
85-
- name: "tethys manage shell < {{ APPLICATION_PATH }}/init_database.py"
79+
- name: "cd {{ APPLICATION_PATH }} && tethys manage shell < init_database.py"
8680
- shell: /bin/bash
8781
- cwd: {{ APPLICATION_PATH }}
8882
- stream: True

salt/ggst.sls

-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
{% set DATA_FOLDER_URL = 'https://geoglows-dashboard-data.s3.us-east-2.amazonaws.com/thredds/ggst' %}
2121

2222

23-
# GGST_tHREDDS_Download_Data:
24-
# cmd.run:
25-
# - name: wget -O {{ GGST_CS_THREDDS_DIRECTORY }} {{ DATA_FOLDER_URL }}
26-
# - shell: /bin/bash
27-
# - require:
28-
# - file: {{ GGST_CS_THREDDS_DIRECTORY }}
29-
3023
Set_GGST_Settings:
3124
cmd.run:
3225
- name: >

salt/gwdm.sls

-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@
3939

4040
{% set DATA_FOLDER_URL = 'https://geoglows-dashboard-data.s3.us-east-2.amazonaws.com/thredds/gwdm' %}
4141

42-
# GWDM_tHREDDS_Download_Data:
43-
# cmd.run:
44-
# - name: wget -O {{ GWDM_CS_DATA_DIRECTORY_PATH }} {{ DATA_FOLDER_URL }}
45-
# - shell: /bin/bash
46-
# - require:
47-
# - file: {{ GWDM_CS_DATA_DIRECTORY_PATH }}
4842

4943

5044
Link_Persistent_Stores_Database_GWDM:

0 commit comments

Comments
 (0)