Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions app-hub/.apphub.env
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
DEBUG=apphub*

#this is the id for the first user being seeded when using seed or start-and-seed scripts. Change it accordingly to your needs
NO_AUTH_MAPPED_USER_ID=58262f57-4f38-45c5-a3c2-9e30ab3ba2da

# Server config.
HOST=0.0.0.0
PORT=3000
DEBUG=apphub*
NODE_ENV=

# Database config.
# If using AWS EBS, these environmental variables will be injected automatically
# (i.e. no need to set them manually in EBS environments). In local/other
# environments configure these for the postgres database to use for the app hub
# backend.
RDS_HOSTNAME=app-hub_db_1
RDS_DB_NAME=app-hub
RDS_USERNAME=app-hub
RDS_PASSWORD=app-hub
RDS_DB_NAME=app-hub
RDS_DB_PORT=

AUTH_STRATEGY=none
# Authentication config.
# Set `NO_AUTH_MAPPED_USER_ID=true` if no auth is used (such as in development).
# `AUTH_STRATEGY` sets the auth strategy used by the backend -- to use auth0 set
# this to 'jwt' and fill in the other `AUTH0_` vars. If not set then
# `NO_AUTH_MAPPED_USER_ID` must be true.
AUTH_STRATEGY=
# The M2M API must use the same audience as the web app, specify the audience to use here.
AUTH0_AUDIENCE=
# Auth0 domain, usually {tenant}.{region}.auth0.com (no protocol!)
AUTH0_DOMAIN=
# Auth0 issuer, usually domain with prepended HTTP-protocol, eg https://{tenant}.{region}.auth0.com
AUTH0_ISSUER=
# Algorithm used for signing the jwt-tokens (e.g. RS256 or HS256)
AUTH0_ALG=
# URI to JWKS that contains the public key for verification of JWT,
# eg. https://{tenant}.{region}.auth0.com/.well-known/jwks.json
AUTH0_JWKS_URI=

#this is the id for the first user being seeded when using seed or start-and-seed scripts. Change it accordingly to your needs
NO_AUTH_MAPPED_USER_ID=58262f57-4f38-45c5-a3c2-9e30ab3ba2da
#Auth0 management-API config, most of these are found under Auth0 Dashboard -> Applications -> Auth0 Management API
# Management-secret used for M2M management API
AUTH0_MANAGEMENT_SECRET=
# Audience for Management API, usually http://{tenant}.auth0.com/api/v2/
AUTH0_MANAGEMENT_AUDIENCE=
#Management client-ID for the Management Application
AUTH0_MANAGEMENT_CLIENT_ID=

# Secret for internal (non-Auth0) JWTs
INTERNAL_JWT_SECRET=

# AWS S3 config (optional).
# Specifies where application files will be stored if using S3.
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=
6 changes: 6 additions & 0 deletions app-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ To start the PostgreSQL server and App Hub backend/frontend you can start everyt

Once started, the services should automatically restart if Docker or the host machine are restarted.

You may check the logs by running:

```bash
> ./scripts/logs.sh
```

You can stop the services manually, this will also destroy the database as this is currently not in a separate volume:

```bash
Expand Down
4 changes: 4 additions & 0 deletions app-hub/scripts/logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

docker-compose logs --timestamps --follow
2 changes: 1 addition & 1 deletion cluster/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DHIS2_CORE_IMAGE=dhis2/core:2.35.3
DHIS2_CORE_IMAGE=dhis2/core:2.36.3
DHIS2_CORE_PORT=8080
DHIS2_CORE_CONTEXT_PATH=
DHIS2_CORE_CONFIG=
8 changes: 6 additions & 2 deletions cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ Once the containers have been built and the database seeded you can start the cl
> ./scripts/start.sh
```

_(it may take a couple minutes for the Java server to initialize)_
_It may take a couple minutes for the Java server to initialize_. You may check the logs by running:

```bash
> ./scripts/logs.sh
```

Once started, the services should automatically restart if Docker or the host machine are restarted.

Expand All @@ -42,7 +46,7 @@ Or destroy the Docker images and all database data (which is stored in a Docker-

## Advanced Usage

By default, `start.sh` will pull the image [amcgee/dhis2-core:dev-alpine](https://hub.docker.com/r/amcgee/dhis2-core/tags/) from Docker Hub. You can specify a custom image tag (though not a custom image at this time) with the environment variable `DHIS2_CORE_TAG`, for example:
By default, `start.sh` will pull the [dhis2/core](https://hub.docker.com/r/dhis2/core/tags) image specified in [.env](.env) from Docker Hub. You can specify a custom image tag (though not a custom image at this time) with the environment variable `DHIS2_CORE_TAG`, for example:

```sh
> DHIS2_CORE_TAG=2.31-rc1-alpine ./scripts/start.sh
Expand Down
4 changes: 4 additions & 0 deletions cluster/scripts/logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

docker-compose logs --timestamps --follow