-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a docker compose file for development
* Added Makefile for quick start and stop * Modified start-enketo.sh for dev with hardcode secrets, single redis config * Modified start-postgres.sh to listen postgres14-upgrade even if data directory is absent * Added instruction in README.md
- Loading branch information
1 parent
f7b89af
commit c32828c
Showing
5 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: dev | ||
dev: | ||
docker compose --profile central -f docker-compose.yml -f docker-compose.dev.yml up -d | ||
|
||
.PHONY: upgrade-successful | ||
upgrade-successful: | ||
docker compose exec postgres14 touch /var/lib/odk/postgresql/14/.postgres14-upgrade-successful | ||
|
||
.PHONY: stop | ||
stop: | ||
docker compose stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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 development of that particular application | ||
# For Central be/fe development, we need postgres14, pyxform, enketo, redis_main | ||
# For Enketo development, we need postgres14, service, nginx, redis_main | ||
# 'none' profile is set for services that are not need for either | ||
# | ||
# 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 | ||
network_mode: host | ||
postgres: | ||
profiles: | ||
- none | ||
mail: | ||
profiles: | ||
- none | ||
service: | ||
profiles: | ||
- none | ||
nginx: | ||
profiles: | ||
- none | ||
pyxform: | ||
profiles: | ||
- central | ||
# changing port here - can't use `ports` mapping with host networking | ||
command: ["gunicorn", "--bind", "0.0.0.0:5001", "--workers", "5", "--timeout", "600", "--max-requests", "1", "--max-requests-jitter", "3", "main:app()"] | ||
network_mode: host | ||
secrets: | ||
profiles: | ||
- none | ||
enketo: | ||
profiles: | ||
- central | ||
depends_on: !reset [] | ||
environment: | ||
- ENV=DEV | ||
network_mode: host | ||
enketo_redis_main: | ||
profiles: | ||
- central | ||
network_mode: host | ||
enketo_redis_cache: | ||
profiles: | ||
- none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters