Skip to content

Commit

Permalink
Merge pull request #36 from GISdevio/devel
Browse files Browse the repository at this point in the history
Implement Sea Storm Atlas, Forecast and Floodmaps
  • Loading branch information
amefad authored Mar 2, 2023
2 parents 8dfb05d + 571f85e commit a06825f
Show file tree
Hide file tree
Showing 116 changed files with 35,649 additions and 701 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,44 @@ jobs:
tags: |
${{ github.ref_name }}
tdsproxy:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v3
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download latest earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.23/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Earthly version
run: earthly --version
- name: build tds_proxy
run: earthly --ci --push +tdsproxy --BRANCH=$GITHUB_SHA --USER=${GITHUB_REPOSITORY_OWNER,,}
- name: Add tags
uses: shrink/actions-docker-registry-tag@v2
with:
registry: ghcr.io
repository: ${{ github.repository }}/iws_${{ github.job }}
target: ${{ github.sha }}
tags: |
${{ github.ref_name }}
# letsencrypt:
# runs-on: ubuntu-latest
# env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ sd.env
.bash*
/iws/measurements/migrations/*
/iws/sea_storm_atlas/migrations/*

node_modules
/src/iws/static/mapstore/extensions/GeoTour/*
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
FROM node:12 as frontend-build

COPY ./src/iws/frontend/ /usr/src
WORKDIR /usr/src

RUN npm install
RUN npm run build


FROM node:16 as floodmaps-ext-build

COPY ./src/iws/mapstore_extensions/geotour/ /usr/src
WORKDIR /usr/src

RUN npm install
RUN npm run build


FROM python:3.9.14-buster
LABEL GeoNode development team

Expand Down Expand Up @@ -76,6 +94,11 @@ RUN pip install --upgrade --no-cache-dir --src /usr/src -r requirements.txt
RUN pip install -r app_requirements.txt
RUN pip install --upgrade -e .

COPY --from=frontend-build /usr/src/static /usr/src/iws/iws/frontend/static
COPY --from=frontend-build /usr/src/webpack-stats.json /usr/src/iws/iws/frontend/webpack-stats.json

COPY --from=floodmaps-ext-build /usr/src/dist /usr/src/iws/iws/static/mapstore/extensions/GeoTour

# Cleanup apt update lists
RUN rm -rf /var/lib/apt/lists/*

Expand Down
10 changes: 10 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,13 @@ letsencrypt:
FROM DOCKERFILE ./docker/letsencrypt/
SAVE IMAGE --push ghcr.io/$USER/iws/iws_$EARTHLY_TARGET_NAME:$BRANCH
SAVE IMAGE --push ghcr.io/$USER/iws/iws_$EARTHLY_TARGET_NAME:$EARTHLY_GIT_HASH


tdsproxy:
ARG EARTHLY_GIT_HASH
ARG EARTHLY_TARGET_NAME
ARG BRANCH
ARG USER
FROM DOCKERFILE ./thredds_proxy/
SAVE IMAGE --push ghcr.io/$USER/iws/iws_$EARTHLY_TARGET_NAME:$BRANCH
SAVE IMAGE --push ghcr.io/$USER/iws/iws_$EARTHLY_TARGET_NAME:$EARTHLY_GIT_HASH
20 changes: 16 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ services:
GF_AUTH_ANONYMOUS_ENABLED: 'true'
GF_SECURITY_ALLOW_EMBEDDING: 'true'
GF_INSTALL_PLUGINS: grafana-worldmap-panel
volumes:
# volumes:
# - /opt/grafana-data:/var/lib/grafana
- grafana-storage:/var/lib/grafana
- /var/www/html:/var/www/html
- /home/gordini/thredds-panel/dist:/var/lib/grafana/plugins/thredds
# - grafana-storage:/var/lib/grafana
# - /var/www/html:/var/www/html
# - /home/gordini/thredds-panel/dist:/var/lib/grafana/plugins/thredds

istorm:
container_name: frontend4${COMPOSE_PROJECT_NAME}
Expand Down Expand Up @@ -229,6 +229,18 @@ services:
volumes:
- statics:/mnt/volumes/statics

tds.proxy:
image: ${COMPOSE_PROJECT_NAME}_tds_proxy
build:
context: ./thredds_proxy/
dockerfile: Dockerfile
container_name: tds_proxy${COMPOSE_PROJECT_NAME}
# volumes:
# - ./thredds_proxy/index.js:/usr/src/app/index.js
# command: npm run dev
command: npm start
ports:
- 5555:5555
volumes:
jenkins_data:
driver: local
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"menu": 1,
"order": 2,
"blank_target": false,
"url": "/sea_storm_atlas/segment/list/"
"url": "/sea_storm_atlas/"
}
},
{
Expand Down
3 changes: 3 additions & 0 deletions src/iws/frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
3 changes: 3 additions & 0 deletions src/iws/frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
static/frontend/
webpack-stats.json
node_modules
Empty file added src/iws/frontend/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions src/iws/frontend/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class FrontendConfig(AppConfig):
name = 'frontend'
Loading

0 comments on commit a06825f

Please sign in to comment.