Skip to content

Commit

Permalink
Merge pull request #416 from HakaiInstitute/fix-install-2024-04-11
Browse files Browse the repository at this point in the history
add the diifferent fixes for a sucessful deployment
  • Loading branch information
JessyBarrette authored May 21, 2024
2 parents 60779c2 + c4bca10 commit 830273f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ DB_HOST_EXTERNAL=localhost

# API
API_URL=http://localhost:8098/api
BASE_URL=http://localhost:8098
REDIS_HOST=redis

# Download scheduler
DOWNLOAD_WAF_URL=https://pac-dev2.cioos.org/images/ceda/
CREATE_PDF=False

# path inside docker
DOWNLOADS_FOLDER=/downloads
DOWNLOADS_FOLDER=./downloads
# [email protected]
# GMAIL_PASSWORD=password

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you just want to see how a dataset is harvested by CDE:

1. Install [Docker](https://docs.docker.com/get-docker/) and [Docker compose](https://docs.docker.com/compose/install/). New versions of Docker include `docker-compose`
1. Rename .env.sample to .env and change any settings if needed. If you are running on your local machine these settings don't need to change
1. `docker-compose up -d` to start all services. This will take a few minute to download, build, create the database schema.
1. `docker-compose -f docker-compose.production.yaml up -d` to start all services. This will take a few minute to download, build, create the database schema.
1. Start your python 3.10 or greater environment, eg `conda create -n cde python=3.10;conda activate cde`
1. `pip install -e ./harvester -e ./db-loader`
1. Run harvester to load data. From this directory, run: `sh data_loader_test.sh` to just load one dataset for testing purposes
Expand Down
2 changes: 1 addition & 1 deletion db-loader/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url="",
packages=["cde_db_loader"],
install_requires=[
"pandas",
"pandas<2.0.0",
"sqlalchemy==1.4.16",
"psycopg2-binary",
"python-dotenv",
Expand Down
1 change: 1 addition & 0 deletions docker-compose.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- ./redis-config/redis.conf:/usr/local/etc/redis/redis.conf
db:
image: "postgis/postgis:13-3.1-alpine"
platform: linux/x86_64
ports:
- "${DB_PORT:-5432}:${DB_PORT:-5432}"
environment:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: "3.3"
services:
db:
image: "$DOCKER_POSTGIS_REPO/postgis:13-3.1-alpine"
image: "postgis/postgis:13-3.1-alpine"
platform: linux/x86_64
ports:
- "${DB_PORT:-5432}:${DB_PORT:-5432}"
environment:
Expand Down
2 changes: 1 addition & 1 deletion download_scheduler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package_data={"download_scheduler": ["templates/*.j2"]},
include_package_data=True,
install_requires=[
"sqlalchemy",
"sqlalchemy<2.0.0",
"psycopg2-binary",
"sentry-sdk",
"python-dotenv",
Expand Down
2 changes: 1 addition & 1 deletion downloader/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
description="",
url="",
packages=["erddap_downloader"],
install_requires=["pandas", "erddapy", "shapely", "pdfkit"],
install_requires=["pandas<2.0.0", "erddapy", "shapely", "pdfkit"],
include_package_data=True,
)
1 change: 1 addition & 0 deletions downloads/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the default download folder defined by the `.env.sample` and used by the downloader
2 changes: 1 addition & 1 deletion harvester/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
package_data={"": ["cde_to_goos_eov.json", "goos_eov_to_standard_name.json"]},
install_requires=[
"requests",
"pandas",
"pandas<2.0.0",
"erddapy",
"shapely",
"sqlalchemy",
Expand Down

0 comments on commit 830273f

Please sign in to comment.