Skip to content

Commit

Permalink
[#3] Add max file size and resource proxy size
Browse files Browse the repository at this point in the history
  • Loading branch information
dedenbangkit committed Nov 8, 2024
1 parent de62818 commit bdd857c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .env.dev.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ DATAPUSHER_VERSION=0.0.20
CKAN_DATAPUSHER_URL=http://datapusher:8800
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan-dev:5000
CKAN__DATAPUSHER__API_TOKEN=CHANGE_ME
# Handle https://stackoverflow.com/questions/23216804/ckan-upload-to-datastore-failed-resource-too-large-to-download
CKAN__RESOURCE_PROXY__MAX_FILE_SIZE=10485760

# NGINX
NGINX_PORT=80
Expand Down
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ DATAPUSHER_VERSION=0.0.20
CKAN_DATAPUSHER_URL=http://datapusher:8800
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000
CKAN__DATAPUSHER__API_TOKEN=CHANGE_ME
# Handle https://stackoverflow.com/questions/23216804/ckan-upload-to-datastore-failed-resource-too-large-to-download
CKAN__RESOURCE_PROXY__MAX_FILE_SIZE=10485760

# NGINX
NGINX_PORT=80
Expand Down
8 changes: 5 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ volumes:
vscode_server:

services:

ckan-dev:
build:
context: ckan/
Expand Down Expand Up @@ -43,6 +42,8 @@ services:
interval: 60s
timeout: 10s
retries: 3
environment:
- DATAPUSHER_MAX_CONTENT_LENGTH=10485760

db:
build:
Expand All @@ -61,8 +62,9 @@ services:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]

test:
["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]

solr:
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
volumes:
Expand Down
21 changes: 15 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ volumes:
traefik-certificates:

services:

traefik:
image: traefik:v3.0
env_file:
Expand Down Expand Up @@ -65,11 +64,18 @@ services:
- ./src:/srv/app/src_extensions
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://ckan:5000/api/action/status_show"]
test:
[
"CMD",
"wget",
"-qO",
"/dev/null",
"http://ckan:5000/api/action/status_show",
]
interval: 30s
timeout: 10s
retries: 6

datapusher:
networks:
- ckannet
Expand All @@ -81,6 +87,8 @@ services:
interval: 60s
timeout: 10s
retries: 3
environment:
- DATAPUSHER_MAX_CONTENT_LENGTH=10485760

db:
build:
Expand All @@ -101,8 +109,9 @@ services:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]

test:
["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]

solr:
networks:
- solrnet
Expand All @@ -120,7 +129,7 @@ services:
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]

networks:
webnet:
ckannet:
Expand Down

0 comments on commit bdd857c

Please sign in to comment.