Skip to content

Commit

Permalink
Merge pull request #61 from openimis/release/24.04
Browse files Browse the repository at this point in the history
Release/24.04
  • Loading branch information
delcroip authored May 1, 2024
2 parents 4cc134a + 5906a5a commit 17f78e9
Show file tree
Hide file tree
Showing 26 changed files with 683 additions and 451 deletions.
12 changes: 4 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PROJECT_NAME=demo
# urls
# url of openimis, FQDN
NEW_OPENIMIS_HOST=demo.openimis.org
DOMAIN=demo.openimis.org
# http port for openimis
HTTP_PORT=80
# https port for openimis
Expand Down Expand Up @@ -32,15 +32,11 @@ SITE_ROOT=api

# github branches to use
# Database, you can use develop branch too
DB_TAG=23.04
DB_TAG=24.04
# BE assembly image tag
BE_TAG=23.04
BE_TAG=24.04
#FE assembly, image tag
FE_TAG=23.04
# REST API, image tag
RESTAPI_TAG=23.04
# rest API flavours
RESTAPI_BUILD_FLAVOR=Release
FE_TAG=24.04

#one-liner json config for the FE (to override the openimis.json from the FE assembly)
#OPENIMIS_FE_CONF_JSON=
Expand Down
187 changes: 187 additions & 0 deletions .env.lightning
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# Default values are optimized for production to avoid having to configure
# much in production.
#
# However it should be easy to get going in development too. If you see an
# uncommented option that means it's either mandatory to set or it's being
# overwritten in development to make your life easier.

# Set this up to handle Github App configuration
# GITHUB_APP_ID=12345
# GITHUB_CERT=Base64-encoded-private-key

# Choose an admin email address and configure a mailer. If you don't specify
# mailer details the local test adaptor will be used and mail previews can be
# viewed at localhost:4000/dev/mailbox
EMAIL_ADMIN='admin@openfn.org'
# MAILGUN_API_KEY='some-key'
# MAILGUN_DOMAIN='some-domain'

# You should generate a random string of 64+ characters for this value in prod.
# You can generate a secure secret by running: ./run secret
SECRET_KEY_BASE=please_generate_a_more_secure_unique_secret_value_for_your_project

# Which environment is running? MIX_ENV should be "dev" or "prod" and NODE_ENV
# should be "production" or "development". When MIX_ENV is set to prod you'll
# automatically be set to build and run releases instead of using mix.
#MIX_ENV=prod
#NODE_ENV=production
MIX_ENV=dev
NODE_ENV=development

# Override the default log level
# Must be a valid level, see: https://hexdocs.pm/logger/1.12.3/Logger.html#module-levels
#LOG_LEVEL=debug

# The URL that will be generated through out your app. When you combine all 3
# values it should be the URL that visitors access in their browser / client.
#URL_SCHEME=https
#URL_HOST=
#URL_PORT=443
URL_SCHEME=http
URL_HOST=localhost
URL_PORT=4000

# If you're using a CDN you can customize which URL gets used for your static
# files. If left commented out it will fall back to using your URL_HOST.
#URL_STATIC_HOST=

# The address and bind port for the web server.
# (See: endpoint config in runtime.exs and Cowboy.)
LISTEN_ADDRESS=0.0.0.0
PORT=4000

# The origins from which you want to allow requests (comma separated)
ORIGINS=//localhost:*

# You can configure error reporting via Sentry by providing a DSN.
# SENTRY_DSN=https://some-url.ingest.sentry.io/some-id

# ==============================================================================
# <><><> JOB EXECUTION SETTINGS <><><>

# You can configure the max run duration for jobs in milliseconds. This should
# be lower than the pod termination grace period if using Kubernetes.
MAX_RUN_DURATION=20000
MAX_DATACLIP_SIZE=10000000

# ------------------------------------------------------------------------------

# ==============================================================================
# <><><> DATABASE SETTINGS <><><>

# Disable SSL connections for Postgres
# In production mode, SSL connections are enforced by default - uncomment to
# disable this behaviour.
#DISABLE_DB_SSL=true

# You you're using Docker for postgres, set POSTGRES_USER and POSTGRES_PASSWORD
# since the postgres Docker image uses them for its default database user and
# password. The database URL will be composed from these variables:
POSTGRES_USER=${DB_USER}
POSTGRES_PASSWORD=${DB_PASSWORD}
POSTGRES_HOST=db
#POSTGRES_PORT=5432
POSTGRES_DB="lightning_${MIX_ENV}"
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT:-5432}/${POSTGRES_DB}"

# If you're not using docker, but running postgres locally and migrating/running
# using `env $(cat .env | grep -v "#" | xargs )` set the database url directly:
# DATABASE_URL=postgres://hello:password@localhost/lightning_dev

# ==============================================================================

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W9PK3JuWmJ2V3NhVWhVSGRuMTdDUXc0Y1ZjK0UKbHQzWXhHVmMvNldIV3E3azB4YXBlVWJucEF4NjNIMTlNZTRjTmJFaXZSb2d4bzdHWERnRDIxbENGUHlCUmZKagpLN2g1VE1lQnRnZjhibGdrVzcxenkyWFdNWnBJRXVRT3ZCZjJqRVJuU0hYTDFrL2NObDQ9Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg"
WORKER_SECRET="dECXNlqctXJ/a+1FI4AaeLZY4Rp+Pxo23WwmJxC2xew="

# Start your app with RTM=false to manage your runtime manually. You might be
# doing this so that you can run `ws-worker` by hand on a local branch, rather
# than using the NPM installed version.
# RTM=false


# Should Docker restart your containers if they go down in unexpected ways?
#DOCKER_RESTART_POLICY=unless-stopped
DOCKER_RESTART_POLICY=no

# What health check test command do you want to run? In development, having it
# curl your web server will result in a lot of log spam, so setting it to
# /bin/true is an easy way to make the health check do basically nothing.
#DOCKER_WEB_HEALTHCHECK_TEST=curl localhost:4000/health_check
DOCKER_WEB_HEALTHCHECK_TEST=/bin/true

# What ip:port should be published back to the Docker host for the app server?
# If you're using Docker Toolbox or a custom VM you can't use 127.0.0.1. This
# is being overwritten in dev to be compatible with more dev environments.
#
# If you have a port conflict because something else is using 4000 then you
# can either stop that process or change 4000 to be something else.
#
# Use the default in production to avoid having it directly accessible to
# the internet without assistance from a cloud based firewall.
#LIGHTNING_EXTERNAL_PORT=127.0.0.1:4000
LIGHTNING_EXTERNAL_PORT=4001

# What volume path should be used? In dev we want to volume mount everything
# so we can develop our code without rebuilding our Docker images.
# Note that by mounting the whole project into the container, you will need to
# follow the Contributing steps in the README.
#LIGHTNING_VOLUME=.:/app

# What CPU and memory constraints will be added to your services? When left at
# 0, they will happily use as much as needed.
#DOCKER_POSTGRES_CPUS=0
#DOCKER_POSTGRES_MEMORY=0
#DOCKER_WEB_CPUS=0
#DOCKER_WEB_MEMORY=0

# Give this variable the value of true if you want the system to create a sample project for a new registered user
INIT_PROJECT_FOR_NEW_USER=false

# If not provided, PURGE_DELETED_AFTER_DAYS defaults to 7. Set to 0 to never purge deleted records.
PURGE_DELETED_AFTER_DAYS=7

# To use https://plausible.io/ analytics, provide the SRC for your script and
# your data-domain below.
# PLAUSIBLE_SRC=https://plausible.io/js/script.js
# PLAUSIBLE_DATA_DOMAIN=openfn.org

# If you wish to enable PromEx-driven Prometheus/Grafana monitoring use the following:
# PROMEX_ENABLED=true
# PROMEX_GRAFANA_HOST=http://localhost:3000
# PROMEX_GRAFANA_USER=admin
# PROMEX_GRAFANA_PASSWORD=admin
# PROMEX_UPLOAD_GRAFANA_DASHBOARDS_ON_START=true
# PROMEX_DATASOURCE_ID=promex
# PROMEX_METRICS_ENDPOINT_AUTHORIZATION_REQUIRED=yes
# PROMEX_METRICS_ENDPOINT_TOKEN=foobar
# PROMEX_ENDPOINT_SCHEME=http

# The length of time an Attempt must remain in the `available` state before it is
# considered `stalled`.
# METRICS_STALLED_ATTEMPT_THRESHOLD_SECONDS=300

# The maximum age of an Attempt that will be considered when measuring
# Attempt performance.
# METRICS_ATTEMPT_PERFORMANCE_AGE_SECONDS=120



# Example .env copied from Lightning repository, full description of variables can be found in
# https://github.com/OpenFn/Lightning

# Thise secrets should be regenerated
PRIMARY_ENCRYPTION_KEY=0bJ9w+hn4ebQrsCaWXuA9JY49fP9kbHmywGd5K7k+/s=
SECRET_KEY_BASE=please_generate_a_more_secure_unique_secret_value_for_your_project


IMIS_USER_FIRST_NAME=IMISUser
IMIS_USER_LAST_NAME=IMISUser
IMIS_USER_PASSWORD=IMISUserPassword
IMIS_USER_EMAIL=IMISUser@openimis.com
IMIS_DB_HOST=db
IMIS_DB_PORT=5439
IMIS_DB_DATABASE=IMIS
IMIS_DB_USER=IMISUser
IMIS_DB_PASSWORD=IMISUserPassword
Loading

0 comments on commit 17f78e9

Please sign in to comment.