Skip to content

Commit

Permalink
chore: import gwells, maintain history (from gwells release branch) (#25
Browse files Browse the repository at this point in the history
)

Co-authored-by: Derek Roberts <derek.roberts@gmail.com>
  • Loading branch information
fergmac and DerekRoberts authored Aug 7, 2024
1 parent 2fa898a commit 8f1b060
Show file tree
Hide file tree
Showing 294 changed files with 30,261 additions and 11,815 deletions.
Binary file added .DS_Store
Binary file not shown.
135 changes: 102 additions & 33 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
# version: '3.7'
# NOTE For Red Hat or other images on the internal registry please login as follows:
# 1. Be logged into the BC Gov OpenShift Console
# https://console.pathfinder.gov.bc.ca:8443/console/catalog)
Expand All @@ -8,6 +8,9 @@ version: '3.7'
# For example:
# docker login -u garywong-bc -p `oc whoami -t` docker-registry.pathfinder.gov.bc.ca
services:
#############################################################################################
### Minio-Pub ###
#############################################################################################
minio-public:
build:
context: ./openshift/docker/minio/
Expand All @@ -22,6 +25,11 @@ services:
MINIO_DATA_DIR: /data
entrypoint: /minio-entrypoint.sh
command: server /data
networks:
- gwells-network
#############################################################################################
### Minio-Priv ###
#############################################################################################
minio-private:
build:
context: ./openshift/docker/minio/
Expand All @@ -33,9 +41,16 @@ services:
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
MINIO_DATA_DIR: /data
entrypoint: /minio-entrypoint.sh
command: server --address :9001 /data
networks:
- gwells-network
#############################################################################################
### CrunchyDB ###
#############################################################################################
db:
platform: linux/x86_64
image: crunchydata/crunchy-postgres-gis:centos7-12.2-4.2.2
hostname: db
environment:
Expand Down Expand Up @@ -64,27 +79,46 @@ services:
source: ./app/database/scripts/local_dev/setup.sql
target: /pgconf/setup.sql
consistency: cached
healthcheck:
test: ["CMD-SHELL", "/usr/pgsql-12/bin/pg_isready", "-d", "gwells"]
interval: 20s
timeout: 30s
retries: 5
start_period: 120s
networks:
- gwells-network
#############################################################################################
### Tileserv ###
#############################################################################################
tileserv:
hostname: tileserv
depends_on:
- db
image: pramsey/pg_tileserv:latest
platform: linux/x86_64
image: pramsey/pg_tileserv:20231005
env_file:
- path: ./.env.test
required: false
environment:
DATABASE_URL: postgres://ftw_reader:test1@db:5432/gwells
DATABASE_URL: "postgres://ftw_reader:${DATABASE_PASSWORD:-test1}@${GWELLS_SERVICE_HOST:-db}:${GWELLS_SERVICE_PORT:-5432}/gwells"
ports:
- "7800:7800"
entrypoint: sh -c "sleep 10; /app/pg_tileserv"
networks:
- gwells-network
#############################################################################################
### Frontend ###
#############################################################################################
frontend:
image: node:8.9.4
image: node:14.21.3
hostname: frontend
working_dir: /app/frontend
environment:
DEBUG: "True"
VUE_APP_AXIOS_BASE_URL: /api/
VUE_APP_VECTOR_TILE_BASE_URL: "/tiles/"
VECTOR_TILE_SERVER: "http://tileserv:7800/"
CHOKIDAR_USEPOLLING: "True"
API_TARGET: "${API_TARGET}"
API_TARGET: "${API_TARGET:-http://backend:8000/}"
command: /bin/bash -c "
set -x &&
cd /app/frontend &&
Expand All @@ -96,40 +130,52 @@ services:
- type: bind
source: ./app/frontend
target: /app/frontend
consistency: cached
- /app/frontend/node_modules/
depends_on:
- backend
networks:
- gwells-network
#############################################################################################
### Backend ###
#############################################################################################
backend:
image: gwells/backend
platform: linux/x86_64
build:
context: ./openshift/docker/backend
dockerfile: Dockerfile.dev
hostname: backend
env_file:
- path: ./.env.test
required: false
environment:
ENVIRONMENT: "${ENVIRONMENT:-local}"
APP_CONTEXT_ROOT: gwells
CSRF_COOKIE_SECURE: "False"
CUSTOM_GDAL_GEOS: "False"
DATABASE_NAME: gwells
DATABASE_USER: gwells
DATABASE_PASSWORD: test1
DATABASE_USER: "${DATABASE_USER:-gwells}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD:-test1}"
DATABASE_SERVICE_NAME: gwells
DJANGO_ADMIN_URL: admin
DJANGO_DEBUG: "True"
DJANGO_SECRET_KEY: secret
ENABLE_ADDITIONAL_DOCUMENTS: "True"
ENABLE_AQUIFERS_SEARCH: "True"
ENABLE_GOOGLE_ANALYTICS: "False"
GWELLS_SERVICE_HOST: db
GWELLS_SERVICE_PORT: 5432
GWELLS_SERVICE_HOST: "${GWELLS_SERVICE_HOST:-db}"
GWELLS_SERVICE_PORT: "${GWELLS_SERVICE_PORT:-5432}"
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
PYTHONUNBUFFERED: "1"
SESSION_COOKIE_SECURE: "False"
SSO_AUDIENCE: gwells-test
SSO_CLIENT: gwells-test
SSO_AUTH_HOST: https://test.oidc.gov.bc.ca/auth
SSO_AUDIENCE: gwells-4121
SSO_CLIENT: gwells-4121
SSO_TEST_AUDIENCE: gwells-api-tests-4820
SSO_TEST_CLIENT: gwells-api-tests-4820
SSO_AUTH_HOST: https://test.loginproxy.gov.bc.ca/auth
SSO_IDP_HINT: "undefined"
SSO_PORT: 0
SSO_REALM: gwells
SSO_PUBKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh+5Hc4w/PKN04avW1LX/orSyXsJ7nJiEbErMyQqCvYAEKmQUeok7Yy+r6sVuJSyQQMCExk37NY3fUQOK92J83oC/9WGij7bvlWHew810edIisechoKpLuQbw63xlj/5ifQfJ977NM1n1RQgXF4hr4MDuhGbV+PAkQGdSPfufjEFleCwj8mvjUwTFnSwE9I+Rf78DVJzCHZbpFMq9skvrpCzeNsLNNoz+k1DENQ6MKnVnbUYskG+j5NZ3g+kxfkRf2G0tw2KisLYtxUSdfwutieT2Zxglk/kZeMWS7khXWzhwjvWf5a1qM5ebreVVYNhra7MjcrkXSh0v5IBcW+122wIDAQAB
SSO_REALM: standard
SSO_PUBKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB
S3_HOST: minio-public:9000
S3_PRIVATE_HOST: minio-private:9001
S3_PRIVATE_BUCKET: gwells
Expand All @@ -145,29 +191,52 @@ services:
S3_WELL_BUCKET: well-docs
S3_WELL_EXPORT_BUCKET: gwells
S3_USE_SECURE: 0
command: /bin/bash -c "
sleep 3 &&
set -x &&
cd /app/backend &&
mkdir -p .pip &&
python3 -m pip install --upgrade pip &&
python3 -m pip install ptvsd &&
python3 -m pip install --cache-dir=.pip -r requirements.txt &&
python3 manage.py migrate --noinput &&
./load_fixtures.sh all &&
python3 manage.py createinitialrevisions &&
python3 manage.py collectstatic --noinput &&
python3 manage.py export --cleanup=1 --upload=1 &&
python3 manage.py runserver 0.0.0.0:8000"
EMAIL_NOTIFICATION_RECIPIENT: sustainment.team@gov.bc.ca
GEOCODER_ADDRESS_API_BASE: https://geocoder.api.gov.bc.ca/addresses.json?
LOCAL: True
command: ./scripts/backend-command-script.sh
volumes:
- type: bind
source: ./app/backend
target: /app/backend
consistency: cached
- type: bind
source: ./app/scripts/backend-command-script.sh
target: /app/scripts/backend-command-script.sh
consistency: cached
ports:
- "8000:8000"
- "3000:3000"
depends_on:
- db
db:
condition: service_healthy
networks:
- gwells-network

#############################################################################################
### Volumes ###
#############################################################################################
pgadmin:
container_name: gwells-pgadmin
image: dpage/pgadmin4
ports:
- 5050:80
environment:
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_DEFAULT_EMAIL: admin@gwells.com
networks:
- gwells-network


#############################################################################################
### Volumes ###
#############################################################################################
volumes:
pgdata-volume:

#############################################################################################
### Network ###
#############################################################################################
networks:
gwells-network:
driver: "bridge"
1 change: 0 additions & 1 deletion gwells/.env

This file was deleted.

24 changes: 24 additions & 0 deletions gwells/.github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug
about: An undesirable behaviour that needs correction
title: ''
labels: ''
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behaviour**
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what actually happens.

** Steps To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
26 changes: 26 additions & 0 deletions gwells/.github/ISSUE_TEMPLATE/spike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Spike
about: Research options prior to development work
title: ''
labels: Spike
assignees: ''

---

**Problem Description**
**In order to** (achieve some goal), (a system or persona) **needs to** (some action).

**Solution Needs**
- Enter the non-negotiables of the solution (what are the needs vs. what are the wants)

**Timebox**
- How much effort are we committing to this research?

**Outcome**
Details describing the outcome of the research
- Was it successful? What direction should the work go?
- Was it unsuccessful? Discuss next steps with team

**Additional Context**
- enter text here
- enter text here
23 changes: 23 additions & 0 deletions gwells/.github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Task
about: Any work that does not directly impact the user
title: ''
labels: Task
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Purpose**
The reason why this task is needed and/or what value it adds.

**Acceptance Criteria**
- [ ] first
- [ ] second
- [ ] third

**Additional context**
- Add any other context about the task here.
- Or here
18 changes: 18 additions & 0 deletions gwells/.github/ISSUE_TEMPLATE/user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: User Story
about: This template is to be used when describing a feature from the user's perspective
title: ''
labels: User Story
assignees: ''

---

**As a** *(User Type/Persona)* **I want** *(Feature/enhancement)* **So That** *(Value, why is this wanted, what is the user trying to accomplish)*

**Additional Context**
- enter text here
- enter text here

**Acceptance Criteria**
- [ ] Given (Context), When (action carried out), Then (expected outcome)
- [ ] Given (Context), When (action carried out), Then (expected outcome)
13 changes: 13 additions & 0 deletions gwells/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Pull Request Standards

- [ ] The title of the PR is accurate
- [ ] The title includes the type of change [`HOTFIX`, `FEATURE`, `etc`]
- [ ] The PR title includes the ticket number in format of `[GWELLS-###]`
- [ ] Documentation is updated to reflect change [`README`, `functions`, `team documents`]

# Description

This PR includes the following proposed change(s):

- { List all the changes made }
- { Include any screenshots necessary }
7 changes: 7 additions & 0 deletions gwells/.github/codeowners
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Matched against repo root (asterisk)
* @bcgov/sustainment-team @DerekRoberts

# Matched against directories
# /.github/workflows/ @mishraomp @DerekRoberts

# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
40 changes: 40 additions & 0 deletions gwells/.github/labeller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Auto Label Git Action Config
# 'label_name'
# - path_of_diff/where/code_lives/to_base_label_upon

# Any change to any file in .github/workflows
'GitHub Actions':
- '.github/workflows/*'

# Any change to the docker-compose file or any dockerfile in the repo
'Docker':
- '**/Dockerfile'
- docker-compose.yml

# Any changes to file or subfolders in /backend
'Backend':
- 'app/backend/**/*'

# Any changes to file or subfolders in /frontend
'Frontend':
- 'app/frontend/**/*'

# Any changes to file or subfolders in /database
'Database':
- 'app/database/**/*'

# Any changes to file or subfolders in /scripts
'Scripts':
- 'app/scripts/**/*'

# Any changes to file or subfolders in /openshift
'OpenShift':
- 'openshift/**/*'

# Any changes to file of subfolders in /tests
'Testing':
- 'tests/**/*'

# Any change to any file in any directory with a .env in name
'Environment Variables':
- '**/*.env*'
Loading

0 comments on commit 8f1b060

Please sign in to comment.