Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream 2019 01 14 #8

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
abb4596
Add missing word
mroswell Oct 11, 2017
e12c3d3
Volume mapping and S3 template for KPI media
jnm Oct 23, 2017
365b524
Merge pull request #137 from mroswell/patch-1
jnm Oct 24, 2017
1a120b1
Increase uWSGI buffer size to fix #147
jnm Nov 14, 2017
bea43d2
Added large_client_header_buffers to nginx public virtual hosts (http…
noliveleger Nov 16, 2017
1533946
Merge pull request #148 from kobotoolbox/147-long-query-strings
jnm Nov 18, 2017
0dfc884
Use Enketo Express 1.55.5 release w/ extra widgets
jnm Dec 6, 2017
398f59c
Merge pull request #151 from kobotoolbox/tagged-enketo-release-with-w…
jnm Dec 6, 2017
4921a17
Upgrade to Enketo Express 1.55.6
jnm Dec 12, 2017
75814b6
Merge pull request #152 from kobotoolbox/upgrade-ee-to-1.55.6
jnm Dec 12, 2017
a96b17f
Merge pull request #142 from kobotoolbox/141-kpi-media
jnm Jan 3, 2018
ccdaff4
Add configuration for kobotoolbox/kobocat#335
jnm Jan 3, 2018
23686b3
Merge pull request #156 from kobotoolbox/155-require_auth-default
jnm Jan 3, 2018
6cd4ee9
Update README.MD for initial setup (Bugfix)
janknobloch Apr 17, 2018
2fff8c2
Merge pull request #171 from janknobloch/patch-1
jnm May 9, 2018
82de875
Pin KC and KPI to 2.018.20, EE to 1.65.5
jnm May 29, 2018
3f18b3d
Pin KC to 449-chown-media (until fix is merged)
jnm May 29, 2018
d7b136f
Merge pull request #178 from kobotoolbox/170-pin-docker-image-tags
jnm May 29, 2018
486151d
Enable literacy widget in Enketo Express
jnm May 29, 2018
f12c479
Merge pull request #179 from kobotoolbox/enable-literacy-widget
jnm May 29, 2018
90e14c8
Enable translations by default
jnm May 29, 2018
cfb1681
Raise upload limit for all apps to 100M
jnm Jun 6, 2018
71e581b
Merge pull request #182 from kobotoolbox/raise-upload-limit
jnm Jun 6, 2018
5e2212b
Raise upload limit for all apps to 100M
jnm Jun 6, 2018
617e4fa
Add environment variables for Celery task timeouts
jnm Jun 26, 2018
0629898
Configure KoBoCAT uWSGI workers in the environment
jnm Jun 26, 2018
dfe4890
Merge pull request #190 from kobotoolbox/kobotoolbox/kobo-docker#188-…
noliveleger Jul 9, 2018
125c85d
Merge pull request #189 from kobotoolbox/187-celery-timeouts
noliveleger Jul 9, 2018
a8d8c54
Upgrade EE to 1.68.0
jnm Jul 31, 2018
f85ab25
Upgrade EE to 1.68.0
jnm Jul 31, 2018
de8dab8
Upgrade EE to 1.69.0
jnm Jul 31, 2018
81a0c60
Upgrade EE to 1.69.0
jnm Jul 31, 2018
9d64b96
Upgrade EE to 1.69.1
jnm Jul 31, 2018
f15c893
Upgrade EE to 1.69.1
jnm Jul 31, 2018
aec87eb
Upgrade KPI to 2.018.31
jnm Jul 31, 2018
344cdaf
Upgrade KPI to 2.018.31
jnm Jul 31, 2018
fbdbf70
Upgrade KoBoCAT to 2.018.31
jnm Jul 31, 2018
a03f1cc
Upgrade KoBoCAT to 2.018.31
jnm Jul 31, 2018
f27782b
Upgrade EE to 1.69.1-jnm
jnm Jul 31, 2018
b8fb253
Upgrade EE to 1.69.1-jnm
jnm Jul 31, 2018
2e44423
Upgrade KPI to 2.018.31a
jnm Aug 2, 2018
d26a381
Upgrade KPI to 2.018.31a
jnm Aug 2, 2018
f6489a8
Upgrade KPI to 2.018.32
jnm Aug 9, 2018
db69faf
Upgrade KPI to 2.018.32
jnm Aug 9, 2018
2986618
Upgrade EE to 1.70.1
jnm Aug 16, 2018
6c747dd
Upgrade EE to 1.70.1
jnm Aug 16, 2018
f016bd2
Upgrade EE to 1.70.3
jnm Aug 30, 2018
f50b95b
Upgrade EE to 1.70.3
jnm Aug 30, 2018
c2ca814
Upgrade KoBoCAT to 2.018.38
jnm Sep 20, 2018
9ad6841
Upgrade KoBoCAT to 2.018.38
jnm Sep 20, 2018
e88c276
Upgrade EE to 1.72.1
jnm Oct 16, 2018
bc0158f
Upgrade EE to 1.72.1
jnm Oct 16, 2018
4802083
Upgrade EE to 1.72.2
jnm Oct 22, 2018
5cb5161
Upgrade EE to 1.72.2
jnm Oct 22, 2018
3be41ed
Update Enketo custom widget paths; closes #211
jnm Nov 1, 2018
9d4bf54
Merge pull request #212 from kobotoolbox/211-enketo-custom-widget-paths
jnm Nov 1, 2018
49f87ef
Upgrade KoBoCAT to 2.018.45
jnm Nov 5, 2018
72a4a63
Upgrade KoBoCAT to 2.018.45
jnm Nov 5, 2018
f106cdd
Upgrade KPI to 2.018.43
jnm Nov 5, 2018
0cf1eb6
Upgrade KPI to 2.018.43
jnm Nov 5, 2018
287e47d
Upgrade KPI to 2.018.45
jnm Nov 6, 2018
a3aefb9
Upgrade KPI to 2.018.45
jnm Nov 6, 2018
0060f13
Upgrade KPI to 2.018.45a
jnm Nov 7, 2018
c5a6591
Upgrade KPI to 2.018.45a
jnm Nov 7, 2018
2f0acd0
Upgrade KPI to 2.018.45b
jnm Nov 8, 2018
a3f1da3
Upgrade KPI to 2.018.45b
jnm Nov 8, 2018
ae36af4
Upgrade KPI to 2.018.45c
jnm Nov 10, 2018
5334f32
Upgrade KPI to 2.018.45c
jnm Nov 10, 2018
b18da21
Upgrade KPI to 2.018.48
jnm Nov 28, 2018
4018214
Upgrade KoBoCAT to 2.018.48
jnm Dec 10, 2018
bfa9987
Upgrade KoBoCAT to 2.018.48
jnm Dec 10, 2018
fadb420
Merge branch 'upstream' into upstream-2019-01-14
Tomatosoup97 Jan 14, 2019
e317081
Remove non-existing widgets
Tomatosoup97 Jan 21, 2019
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ secrets/
build
docker-compose.yml
.transifexrc
.idea/
*.override.yml
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Once this is noted, you can `docker-compose stop` and search for potentially-mis

# kobo-docker

`kobo-docker` is used to run a copy of the [KoBo Toolbox](http://www.kobotoolbox.org) survey data collection platform on a machine of your choosing. It relies [Docker](https://docker.com) to separate the different parts of KoBo into different containers (which can be thought of as lighter-weight virtual machines) and [Docker Compose](https://docs.docker.com/compose/) to configure, run, and connect those containers. Below is a diagram (made with [Lucidchart](lucidchart.com)) of the containers that make up a running `kobo-docker` system and their connections:
`kobo-docker` is used to run a copy of the [KoBo Toolbox](http://www.kobotoolbox.org) survey data collection platform on a machine of your choosing. It relies on [Docker](https://docker.com) to separate the different parts of KoBo into different containers (which can be thought of as lighter-weight virtual machines) and [Docker Compose](https://docs.docker.com/compose/) to configure, run, and connect those containers. Below is a diagram (made with [Lucidchart](lucidchart.com)) of the containers that make up a running `kobo-docker` system and their connections:
![Container diagram](./doc/Container_diagram.png)


Expand Down Expand Up @@ -42,6 +42,12 @@ Once this is noted, you can `docker-compose stop` and search for potentially-mis

11. Start the server: `docker-compose up -d` (or without the `-d` option to run in the foreground).

11 - Bugfix. # FORM DEPLOYMENT BUG PLEASE BE ADVICED - AS FROM 10/04/2018: (should be removed when fixed)
If you start the kobo-docker framework the first time you have to set the permission of the media-folder correctly.
otherwise form deployment as well as project creation will fail:
Please run the following command inside your kobo-docker folder:
`docker-compose exec kobocat chown -R wsgi /srv/src/kobocat`

12. Container output can be followed with `docker-compose logs -f`. For an individual container, logs can be followed by using the container name from your `docker-compose.yml` with e.g. `docker-compose logs -f enketo_express`.

"Local" setup users can now reach KoBo Toolbox at `http://${HOST_ADDRESS}:${KPI_PUBLIC_PORT}` (substituting in the values entered in [`envfile.local.txt`](./envfile.local.txt)), while "server" setups can be reached at `https://${KOBOFORM_PUBLIC_SUBDOMAIN}.${PUBLIC_DOMAIN_NAME}` (similarly substituting from [`envfile.server.txt`](./envfile.server.txt)). Be sure to periodically update your containers, especially `nginx`, for security updates by pulling new changes from this `kobo-docker` repo then running e.g. `docker-compose pull && docker-compose up -d`.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ kpi:
- mongo
volumes:
- ./.vols/static/kpi:/srv/static
- ./.vols/kpi_media:/srv/src/kpi/media
# The Whoosh search index needs persistent storage
- ./.vols/whoosh:/srv/whoosh
- ./log/kpi:/srv/logs
Expand Down
1 change: 1 addition & 0 deletions docker-compose.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ kpi:
- mongo
volumes:
- ./.vols/static/kpi:/srv/static
- ./.vols/kpi_media:/srv/src/kpi/media
# The Whoosh search index needs persistent storage
- ./.vols/whoosh:/srv/whoosh
- ./log/kpi:/srv/logs
Expand Down
7 changes: 6 additions & 1 deletion enketo_express/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"linked form and data server": {
"name": "KoBo Toolbox",
"server url": ""
}
},
"widgets": [
"note", "select-desktop", "select-mobile", "autocomplete", "geo", "textarea",
"table", "radio", "date", "time", "datetime", "compact", "file", "draw",
"likert", "distress", "horizontal", "image-view", "comment", "image-map", "date-mobile"
]
}
4 changes: 4 additions & 0 deletions envfiles/aws.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
#KOBOCAT_DEFAULT_FILE_STORAGE=storages.backends.s3boto.S3BotoStorage
# To use S3 for KoBoCAT's storage, the specified bucket must already exist and the owner of your `AWS_ACCESS_KEY_ID` must have the appropriate S3 permissions.
#KOBOCAT_AWS_STORAGE_BUCKET_NAME=

# KPI also uses media file storage for users' data exports
#KPI_DEFAULT_FILE_STORAGE=storages.backends.s3boto.S3BotoStorage
#KPI_AWS_STORAGE_BUCKET_NAME=
9 changes: 9 additions & 0 deletions envfiles/kobocat.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Uncomment the following to require authentication for viewing blank forms and
# submitting data
#REQUIRE_AUTHENTICATION_TO_SEE_FORMS_AND_SUBMIT_DATA_DEFAULT=True

KOBOCAT_DJANGO_DEBUG=False
TEMPLATE_DEBUG=False

Expand All @@ -9,6 +13,7 @@ KOBO_POSTGRES_USER=kobo
KOBOCAT_BROKER_URL=amqp://kobocat:kobocat@rabbit:5672/kobocat

#TIME_ZONE=America/New_York
#KOBOCAT_UWSGI_PROCESS_COUNT=2
#ENKETO_OFFLINE_SURVEYS=True
#KOBOCAT_MONGO_HOST=mongo
#KOBOCAT_MONGO_PORT=27017
Expand All @@ -24,6 +29,10 @@ KOBOCAT_BROKER_URL=amqp://kobocat:kobocat@rabbit:5672/kobocat
#KOBOCAT_DEFAULT_FILE_STORAGE=
#EMAIL_FILE_PATH=./emails

# Celery task time limits in seconds (affects legacy exports only)
#CELERYD_TASK_TIME_LIMIT=2100
#CELERYD_TASK_SOFT_TIME_LIMIT=1800

# Dev: One or more mappings from PyDev remote debugging machine file paths to `kobocat` container
# file paths (see https://github.com/kobotoolbox/kobocat/blob/master/docker/setup_pydev.bash).
#KOBOCAT_PATH_FROM_ECLIPSE_TO_PYTHON_PAIRS=~/devel/kobocat -> /srv/src/kobocat | ~/.virtualenvs/kobocat/lib/python2.7/site-packages -> /usr/local/lib/python2.7/dist-packages
4 changes: 4 additions & 0 deletions envfiles/kpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ DATABASE_URL=postgres://kobo:kobo@postgres:5432/kobotoolbox
#KPI_UWSGI_PROCESS_COUNT=2
#KOBO_SUPPORT_URL=http://support.kobotoolbox.org/

# Celery task time limits in seconds
#CELERYD_TASK_TIME_LIMIT=2100
#CELERYD_TASK_SOFT_TIME_LIMIT=1800

# Dev: One or more mappings from PyDev remote debugging machine file paths to `kpi` container file
# paths (see https://github.com/kobotoolbox/kpi/blob/master/docker/setup_pydev.bash).
#KPI_PATH_FROM_ECLIPSE_TO_PYTHON_PAIRS=~/devel/kpi -> /srv/src/kpi | ~/devel/formpack/src/formpack -> /usr/local/lib/python2.7/dist-packages/formpack
4 changes: 3 additions & 1 deletion nginx/nginx_site_http.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ server {
error_log /var/log/nginx/kobocat.error.log;

# max upload size
client_max_body_size 75M;
client_max_body_size 100M;

# Serve locations containing 'submission' or 'formList' via HTTP without
# further ado, since ODK Collect makes requests containing those terms and
Expand Down Expand Up @@ -42,6 +42,8 @@ server {
access_log /var/log/nginx/kpi.access.log;
error_log /var/log/nginx/kpi.error.log;

client_max_body_size 100M;

${kpi_location_static}

error_page 418 = /static/html/Offline.html;
Expand Down
22 changes: 20 additions & 2 deletions nginx/nginx_site_https.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ server {
listen 80;
server_name ${KOBOCAT_PUBLIC_SUBDOMAIN}.${PUBLIC_DOMAIN_NAME};

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

access_log /var/log/nginx/kobocat.access.log;
error_log /var/log/nginx/kobocat.error.log;

Expand All @@ -35,7 +38,10 @@ server {
ssl_ciphers 'AES256+EECDH:AES256+EDH:DHE-RSA-AES128-SHA';

# max upload size
client_max_body_size 75M;
client_max_body_size 100M;

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

access_log /var/log/nginx/kobocat.access.log;
error_log /var/log/nginx/kobocat.error.log;
Expand All @@ -59,6 +65,9 @@ server {
access_log /var/log/nginx/kpi.access.log;
error_log /var/log/nginx/kpi.error.log;

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

return 301 https://$server_name$request_uri;
}

Expand All @@ -70,7 +79,10 @@ server {
ssl_certificate /tmp/kobo_toolbox_secrets/ssl.crt;

# max upload size
client_max_body_size 75M;
client_max_body_size 100M;

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'AES256+EECDH:AES256+EDH';
Expand Down Expand Up @@ -99,6 +111,9 @@ server {
access_log /var/log/nginx/enketo_express.access.log;
error_log /var/log/nginx/enketo_express.error.log;

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

return 301 https://$http_host$request_uri;
}

Expand Down Expand Up @@ -126,6 +141,9 @@ server {

client_max_body_size 100M;

# Support bigger headers. Useful for huge cookies
large_client_header_buffers 8 16k;

add_header Strict-Transport-Security max-age=63072000;
#add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
Expand Down
4 changes: 4 additions & 0 deletions nginx/uwsgi_pass.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ uwsgi_param HTTP_X_REAL_IP $remote_addr;
uwsgi_param HTTP_X_FORWARDED_FOR $remote_addr;
uwsgi_param HTTP_X_FORWARDED_PROTO $scheme;
include /etc/nginx/uwsgi_params;

# Support longer query strings. See issue #147
uwsgi_buffers 8 16k;
uwsgi_buffer_size 16k;