Skip to content

Commit

Permalink
16052 mosaic returns empty tiles (#10)
Browse files Browse the repository at this point in the history
* Setup dev mode

Add local compose conf
Make catalog worker Postgres index update job to be optional
Enable oauth https on the prod only
Remove mosaic related services from local compose conf

* Setup dev mode vol2

Add local env sample
Add OAM_LAYER_ID env var
Add mosaic map info to README.md
Remove postgres conf, because it moved to mosaic-map repo

* Extend the image metadata

* Return the meta obj when the image meta updated

* Update marblecutter-tools baseimage
  • Loading branch information
dqunbp authored Jun 22, 2023
1 parent b1c48ae commit 92b5332
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 237 deletions.
36 changes: 36 additions & 0 deletions .env.local.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# OAuth login for users
# ---------------------

FACEBOOK_APP_ID=fillme
FACEBOOK_APP_SECRET=fillme

GOOGLE_CLIENT_ID=fillme
GOOGLE_CLIENT_SECRET=fillme

GDRIVE_KEY=fillme

# OAM-specific
# ------------

# The bucket into which images uploaded by users are placed
OIN_BUCKET=fillme
# Convenience for not having to create new buckets. Eg; Travis CI tests require this.
# Remove if not needed, do not leave empty.
# OIN_BUCKET_PREFIX=development
# A bucket just for somewhere to place imagery uploaded from the browser, before it
# gets fully processed.
UPLOAD_BUCKET=fillme
# Used to identify imagery after it has been uploaded.
S3_PUBLIC_DOMAIN=s3.eu-central-1.amazonaws.com

# AWS credentials
AWS_ACCESS_KEY_ID=fillme
AWS_SECRET_ACCESS_KEY=fillme
AWS_REGION=eu-central-1 # the same region as S3_PUBLIC_DOMAIN

# For sending emails
SENDGRID_API_KEY=fillme
SENDGRID_FROM=fillme

# required to run locally
NEW_RELIC_LICENSE_KEY=a1b2c3
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ npm-debug.log
*#
.DS_STORE
.netbeans
.env
.env*
!.env.sample
!.env.local.sample
.idea
.node_history
temp
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/mojodna/marblecutter-tools
FROM public.ecr.aws/r4e3a2l5/marblecutter-tools:latest

ARG NODE_ENV=production

Expand Down
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ And the background OIN indexer can be run with: `node catalog-worker.js`

## Development Using Docker

Before running `oam-api` you need to run `oam-mosaic`

```bash
git clone https://github.com/hotosm/oam-mosaic-map
cd oam-mosaic-map
docker-compose up
```

To start a self-contained development instance using Docker Compose, run:

```bash
Expand All @@ -47,32 +55,13 @@ Once it has started, connect to `http://localhost:4000` to access the API.

The MongoDB command line interface can be run within its container like so: `docker-compose exec mongo mongo`

The following environment variables should be set (probably in `.env`; see `sample.env` for defaults and additional information):
Use `http://localhost:8081` to inspect the `mongo` database content with `mongo-express`.

```bash
# AWS credentials for writing to S3
AWS_ACCESS_KEY_ID=<redacted>
AWS_SECRET_ACCESS_KEY=<redacted>
AWS_REGION=us-east-1

# Social login
FACEBOOK_APP_ID=<redacted>
FACEBOOK_APP_SECRET=<redacted>
GOOGLE_CLIENT_ID=<redacted>
GOOGLE_CLIENT_SECRET=<redacted>

# S3 resources
OIN_BUCKET=<redacted>
OIN_BUCKET_PREFIX=<optional>
UPLOAD_BUCKET=<redacted>

# JWT Secret Key
JWT_SECRET_KEY=<redacted>
```
The following environment variables should be set (probably in `.env.local`; see `.env.local.sample` for defaults and additional information)

If Docker does not bind / forward ports to `localhost`, set `HOST_TLD` to the Docker hostname and use that to access the API.
If `OIN_REGISTER_URL` env variable is not set, the `OIN_BUCKET` will be used for indexing by default.
You can also set `OIN_REGISTER_URL=http://register:8080/fixtures/oin-buckets.json` to the `worker` service on `docker-compose.yml` and then modify `test/fixtures/oin-buckets.json` to specify a bucket for indexing.

To specify a bucket for indexing, modify `test/fixtures/oin-buckets.json`.

Instructions for generating the JWT signing key can be found [here](https://github.com/dwyl/hapi-auth-jwt2#generating-your-secret-key).
If you find that additional environment variables are needed, please submit a pull request!
Expand Down
Loading

0 comments on commit 92b5332

Please sign in to comment.