Skip to content

Commit

Permalink
Merge branch 'master' into node-version
Browse files Browse the repository at this point in the history
  • Loading branch information
lognaturel authored Jan 21, 2025
2 parents bb8a304 + e7b04da commit b4cd3b1
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 9 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
docker-compose-dev := docker compose --profile central -f docker-compose.yml -f docker-compose.dev.yml

.PHONY: dev
dev:
$(docker-compose-dev) up -d

.PHONY: stop
stop:
$(docker-compose-dev) stop
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ In addition to the Backend and the Frontend, Central deploys services:
* Central relies on [pyxform-http](https://github.com/getodk/pyxform-http) for converting Forms from XLSForm. It generally shouldn't be needed in development but can be run locally.
* Central relies on [Enketo](https://github.com/enketo/enketo-express) for Web Form functionality. Enketo can be run locally and configured to work with Frontend and Backend in development by following [these instructions](https://github.com/getodk/central-frontend/blob/master/docs/enketo.md).

## Operations
If you want to work on the Central codebase and don't want to setup dependent services like Postgresql, Enketo, etc manually then you can run `make dev`, which will start those services as Docker containers. This setup requires a local domain name, `central-dev` is a good choice. Add this name in the following places:

* Set `DOMAIN=central-dev` in the `.env` file.
* Add an entry in your `/etc/hosts` file for `127.0.0.1 central-dev`.
* Create `local.json` in the central-backend directory and set the value of `default.env.domain` to `http://central-dev:8989`

## Operations
This repository serves administrative functions, but it also contains the Docker code for building and running a production Central stack.

To learn how to run such a stack in production, please take a look at [our DigitalOcean installation guide](https://docs.getodk.org/central-install-digital-ocean/).
Expand Down
2 changes: 1 addition & 1 deletion client
62 changes: 62 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Assumption: This file will be merged by `docker compose`
#
# What it does:
# Sets profiles for each service depending on whether that
# service is required for Central development or not.
#
# depends_on of some services are reset using !reset custom yml tag
# nb: can't replace depends_on so we have removed all the values, ok for dev
services:
postgres14:
profiles:
- central
ports:
- 5432:5432
postgres:
profiles:
- central
image: debian:bullseye
command: /bin/sh -c 'mkdir -p /var/lib/postgresql/14/data && touch /var/lib/postgresql/14/.postgres14-upgrade-successful'
mail:
profiles:
- none
service:
profiles:
- none
nginx:
profiles:
- none
pyxform:
profiles:
- central
ports:
- 5001:80
secrets:
profiles:
- central
volumes:
- dev_secrets:/etc/secrets
working_dir: /etc/secrets
command: /bin/sh -c 'echo "s0m3v3rys3cr3tk3y" > enketo-secret && echo "this $3cr3t key is crackable" > enketo-less-secret && echo "enketorules" > enketo-api-key'
enketo:
profiles:
- central
volumes:
- dev_secrets:/etc/secrets
depends_on: !override
- secrets
- enketo_redis_main
environment:
- ENV=DEV
extra_hosts:
- "${DOMAIN}:host-gateway"
ports:
- 8005:8005
enketo_redis_main:
profiles:
- central
enketo_redis_cache:
profiles:
- central
volumes:
dev_secrets:
12 changes: 6 additions & 6 deletions docs/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
</head>
<body>
<div class="news-item">
<span class="item-date">2024/12/17</span>
<a href="https://forum.getodk.org/t/odk-central-v2024-3-year-end-goodies/51515" target="_blank">
ODK Central v2024.3
<span class="item-date">2025/01/13</span>
<a href="https://forum.getodk.org/t/odk-central-v2024-3-offline-entities-submission-deletes-and-faster-form-uploads/51515/3" target="_blank">
ODK Central v2024.3.1
</a>
</div>
<div class="news-item">
<span class="item-date">2024/10/17</span>
<a href="https://forum.getodk.org/t/odk-central-v2024-2-submission-deletes-and-s3-media-storage/49742/3" target="_blank">
ODK Central v2024.2.1
<span class="item-date">2024/12/17</span>
<a href="https://forum.getodk.org/t/odk-central-v2024-3-year-end-goodies/51515" target="_blank">
ODK Central v2024.3
</a>
</div>
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "81f288331d6e4638be205e0e63388165"}'></script>
Expand Down

0 comments on commit b4cd3b1

Please # to comment.