Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4644 First go at getting tests to run in docker-compose
- Loading branch information
David Read
committed
Feb 10, 2019
1 parent
689c488
commit eb0f9af
Showing
4 changed files
with
79 additions
and
2 deletions.
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
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,6 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# set_environment | ||
# ckan-paster --plugin=ckan db init -c "${CKAN_CONFIG}/production.ini" | ||
# exec "$@" |
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,62 @@ | ||
# docker-compose build && docker-compose up -d | ||
# If "docker-compose logs ckan" shows DB not ready, run "docker-compose restart ckan" a few times. | ||
version: "3" | ||
|
||
volumes: | ||
ckan_config: | ||
ckan_home: | ||
ckan_storage: | ||
pg_data: | ||
|
||
services: | ||
ckan: | ||
container_name: ckan | ||
build: | ||
context: ../../ | ||
args: | ||
- CKAN_SITE_URL=ignored in tests | ||
- DEVELOPER_SETUP=true | ||
links: | ||
- db | ||
- solr | ||
- redis | ||
volumes: | ||
- ckan_config:/etc/ckan | ||
- ckan_home:/usr/lib/ckan | ||
- ckan_storage:/var/lib/ckan | ||
command: | ||
- nosetests --ckan --with-pylons=test-core.ini ckan ckanext | ||
|
||
datapusher: | ||
container_name: datapusher | ||
image: clementmouchet/datapusher | ||
ports: | ||
- "8800:8800" | ||
|
||
db: | ||
container_name: db | ||
build: | ||
context: ../../ | ||
dockerfile: contrib/docker/postgresql/Dockerfile | ||
args: | ||
# match the creds hard-coded in test-core.ini | ||
- POSTGRES_DB=ckan_test | ||
- POSTGRES_USER=ckan_default | ||
- DS_RO_PASS=pass | ||
- POSTGRES_PASSWORD=pass | ||
environment: | ||
- DS_RO_PASS=pass | ||
- POSTGRES_PASSWORD=pass | ||
volumes: | ||
- pg_data:/var/lib/postgresql/data | ||
|
||
solr: | ||
container_name: solr | ||
build: | ||
context: ../../ | ||
dockerfile: contrib/docker/solr/Dockerfile | ||
|
||
|
||
redis: | ||
container_name: redis | ||
image: redis:latest |
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