-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from DCOR-dev/dcor_develop
Develop a CKAN based DCOR image with custom developed extensions
- Loading branch information
Showing
8 changed files
with
197 additions
and
82 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 was deleted.
Oops, something went wrong.
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,52 @@ | ||
name: Build and Push DCOR-CKAN Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*.*.*' # This triggers the workflow on tags that follow the X.Y.Z format | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Build and Push NGINX Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./nginx | ||
file: ./nginx/Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:${{ github.ref_name }} | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-nginx:latest | ||
- name: Build and Push PostgreSQL Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./postgresql | ||
file: ./postgresql/Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:${{ github.ref_name }} | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-postgresql:latest | ||
- name: Build and Push CKAN Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ckan | ||
file: ./ckan/Dockerfile.dev # Build dcor image from dev | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan:${{ github.ref_name }} | ||
${{ secrets.DOCKER_USERNAME }}/dcor-ckan-docker-ckan: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# generic | ||
.DS_Store | ||
.vagrant | ||
.idea | ||
|
||
# code & config | ||
_service-provider/* | ||
|
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,3 @@ | ||
0.1.0 | ||
- initial version of dcor-ckan image | ||
- build and push dcor-ckan image to dockerhub |
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,4 @@ | ||
#!/bin/bash | ||
|
||
pip3 install dcor_control | ||
dcor inspect --assume-yes |
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,100 @@ | ||
volumes: | ||
ckan_storage: | ||
pg_data: | ||
solr_data: | ||
pip_cache: | ||
site_packages: | ||
vscode_server: | ||
minio_data: | ||
|
||
services: | ||
dcor-ckan-dev: | ||
build: | ||
context: ckan/ | ||
dockerfile: Dockerfile.dev | ||
args: | ||
- TZ=${TZ} | ||
env_file: | ||
- .env | ||
links: | ||
- db | ||
- solr | ||
- redis | ||
- minio | ||
# This is defined as a docker resource in `dcor_control` | ||
hostname: dcor-dev-docker | ||
ports: | ||
- "0.0.0.0:${CKAN_PORT_HOST}:5000" | ||
volumes: | ||
- ckan_storage:/var/lib/ckan | ||
- ./src:/srv/app/src_extensions | ||
- pip_cache:/root/.cache/pip | ||
- site_packages:/usr/lib/python3.10/site-packages | ||
- vscode_server:/root/.vscode-server | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"] | ||
|
||
datapusher: | ||
image: ckan/ckan-base-datapusher:${DATAPUSHER_VERSION} | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"] | ||
|
||
db: | ||
build: | ||
context: postgresql/ | ||
environment: | ||
- POSTGRES_USER | ||
- POSTGRES_PASSWORD | ||
- POSTGRES_DB | ||
- CKAN_DB_USER | ||
- CKAN_DB_PASSWORD | ||
- CKAN_DB | ||
- DATASTORE_READONLY_USER | ||
- DATASTORE_READONLY_PASSWORD | ||
- DATASTORE_DB | ||
volumes: | ||
- pg_data:/var/lib/postgresql/data | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] | ||
|
||
solr: | ||
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION} | ||
volumes: | ||
- solr_data:/var/solr | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"] | ||
|
||
redis: | ||
image: redis:${REDIS_VERSION} | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "-e", "QUIT"] | ||
|
||
minio: | ||
image: minio/minio:latest | ||
restart: unless-stopped | ||
environment: | ||
- MINIO_ROOT_USER | ||
- MINIO_ROOT_PASSWORD | ||
command: minio server --console-address ":9001" /data | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
volumes: | ||
- minio_data:/data | ||
|
||
mc: | ||
image: minio/mc:RELEASE.2020-08-08T02-33-58Z | ||
depends_on: | ||
- minio | ||
entrypoint: > | ||
/bin/sh -c " | ||
/usr/bin/mc config host rm local; | ||
/usr/bin/mc config host add --api s3v4 local http://minio:9000 minioadmin minioadmin; | ||
/usr/bin/mc mb local/ckan/; | ||
/usr/bin/mc policy set download local/ckan/storage; | ||
" |