Skip to content

Commit

Permalink
Merge pull request #733 from Websoft9/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
qiaofeng1227 authored Oct 24, 2024
2 parents 117dcd3 + f7ecf6d commit be890a3
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 6 deletions.
22 changes: 21 additions & 1 deletion apps/ckan/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# ckan env from: https://github.com/ckan/ckan-docker/blob/master/.env.example
# Websoft9-specific variables
W9_REPO=ckan/ckan-base
W9_DIST=community
W9_VERSION=2.10.0
W9_POWER_PASSWORD=urtghkikljee9uy

W9_ID=ckan
# Port Configurations
W9_HTTP_PORT=5000
W9_HTTP_PORT_SET=5000
W9_NETWORK=websoft9
W9_URL=internet_ip

# CKAN databases
CKAN_SQLALCHEMY_URL=postgresql://ckandbuser:$W9_POWER_PASSWORD@db/ckandb
CKAN_DATASTORE_WRITE_URL=postgresql://ckandbuser:$W9_POWER_PASSWORD@db/datastore
CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:$W9_POWER_PASSWORD@db/datastore

# ckan env from: https://github.com/ckan/ckan-docker/blob/master/.env.example
# CKAN Core
CKAN_SITE_URL=http://localhost:5000
CKAN_DATAPUSHER_URL=http://datapusher:8800
CKAN_REDIS_URL=redis://redis:6379/1
CKAN_SOLR_URL=http://solr:8983/solr/ckan
91 changes: 87 additions & 4 deletions apps/ckan/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,93 @@
# image: https://hub.docker.com/r/ckan/ckan-base
# compose refer to: https://github.com/ckan/ckan-docker/blob/master/docker-compose.yml
# docs: https://docs.ckan.org/en/2.10/maintaining/installing/index.html

version: "3.8"

services:
ckan:
container_name: $W9_ID
image: $W9_REPO:$W9_VERSION
env_file: .env
ports:
- $W9_HTTP_PORT_SET:5000
depends_on:
db:
condition: service_healthy
solr:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ckan_storage:/var/lib/ckan
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000/api/action/status_show"]
interval: 60s
timeout: 10s
retries: 3

datapusher:
container_name: $W9_ID-datapusher
image: $W9_REPO-datapusher:0.0.20
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"]
interval: 60s
timeout: 10s
retries: 3


db:
container_name: $W9_ID-postgres
image: ckan/ckan-postgres-dev:2.10
env_file: .env
environment:
POSTGRES_USER: ckan
POSTGRES_PASSWORD: $W9_POWER_PASSWORD
POSTGRES_DB: ckan
CKAN_DB_USER: ckandbuser
CKAN_DB_PASSWORD: $W9_POWER_PASSWORD
CKAN_DB: ckandb
DATASTORE_READONLY_USER: datastore_ro
DATASTORE_READONLY_PASSWORD: $W9_POWER_PASSWORD
DATASTORE_DB: datastore
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan", "-d", "ckan"]
interval: 30s
timeout: 10s
retries: 5

solr:
container_name: $W9_ID-solr
image: ckan/ckan-solr:2.10-solr9
volumes:
- solr_data:/var/solr
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8983/solr/"]
interval: 30s
timeout: 10s
retries: 5

redis:
container_name: $W9_ID-redis
image: redis:6
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]
interval: 30s
timeout: 10s
retries: 5

volumes:
ckan_storage:
postgres_data:
solr_data:

networks:
default:
name: ${W9_NETWORK}
external: true
default:
name: ${W9_NETWORK}
external: true
2 changes: 1 addition & 1 deletion apps/joomla/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ W9_ID=joomla
W9_URL=appname.example.com

W9_DB_EXPOSE="mariadb"
W9_MARIADB_VERSION=10.6
W9_MARIADB_VERSION=latest

W9_LOGIN_USER=admin
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
Expand Down

0 comments on commit be890a3

Please sign in to comment.