-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
239 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
--- | ||
name: update docker compose | ||
about: update version or docker-compose this project | ||
title: 'update docker-compose.yml for [appname]' | ||
labels: 'feature' | ||
name: Update application's version | ||
about: Update application's version | ||
title: 'Update version to [x.x.x] for [appname]' | ||
labels: 'update,S-research' | ||
assignees: '' | ||
--- | ||
|
||
**What type of your feature request?** | ||
|
||
- [ ] Install app with latest version in websoft9 | ||
- Install app in websoft9 | ||
- delete container and volumes | ||
- edit version and recreate app | ||
- [ ] when latest app error, go to official url to update compose | ||
- [ ] test it util app is normally running | ||
- [ ] pull request to docker-library | ||
Change the W9_VERSION to target version number at `.env` and test it | ||
|
||
**Research and development steps your need to do** | ||
|
||
- [ ] Check the official installation docs of this application | ||
- [ ] Add a comment with docker logs | ||
- [ ] If need to update documentation, add issue at [Websoft9 docs](https://github.com/websoft9/doc.websoft9.com) | ||
|
||
**How to commit your change to [docker-library](https://github.com/Websoft9/docker-library)?** | ||
|
||
``` | ||
docker exec -it websoft9-apphub bash | ||
apphub subimt --appid wordpress_77juue--appname wordpress --github_email --github_user | ||
``` | ||
- [ ] release and final test | ||
apphub subimt --appid --github_token | ||
``` | ||
|
||
**Testing steps** | ||
|
||
- [ ] Upload your sreenshoot to PR | ||
- [ ] Automation testing when submit PR to dev branch | ||
- [ ] System testing for dev branch |
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 |
---|---|---|
|
@@ -2,23 +2,76 @@ | |
# Websoft9-specific variables | ||
W9_REPO=ckan/ckan-base | ||
W9_DIST=community | ||
W9_VERSION=2.10.0 | ||
W9_VERSION=2.11.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 databases | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=$W9_POWER_PASSWORD | ||
POSTGRES_DB=postgres | ||
POSTGRES_HOST=db | ||
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 | ||
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 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 | ||
# Test database connections | ||
TEST_CKAN_SQLALCHEMY_URL=postgres://ckan:ckan@db/ckan_test | ||
TEST_CKAN_DATASTORE_WRITE_URL=postgresql://ckan:ckan@db/datastore_test | ||
TEST_CKAN_DATASTORE_READ_URL=postgresql://datastore_ro:datastore@db/datastore_test | ||
|
||
# Dev settings | ||
USE_HTTPS_FOR_DEV=false | ||
|
||
# CKAN core | ||
CKAN_SITE_ID=default | ||
CKAN_SITE_URL=http://$W9_URL | ||
CKAN___BEAKER__SESSION__SECRET=CHANGE_ME | ||
# See https://docs.ckan.org/en/latest/maintaining/configuration.html#api-token-settings | ||
CKAN___API_TOKEN__JWT__ENCODE__SECRET=string:CHANGE_ME | ||
CKAN___API_TOKEN__JWT__DECODE__SECRET=string:CHANGE_ME | ||
CKAN_SYSADMIN_NAME=ckan_admin | ||
CKAN_SYSADMIN_PASSWORD=$W9_POWER_PASSWORD | ||
CKAN_SYSADMIN_EMAIL=[email protected] | ||
CKAN_STORAGE_PATH=/var/lib/ckan | ||
CKAN_SMTP_SERVER=smtp.corporateict.domain:25 | ||
CKAN_SMTP_STARTTLS=True | ||
CKAN_SMTP_USER=user | ||
CKAN_SMTP_PASSWORD=$W9_POWER_PASSWORD | ||
CKAN_SMTP_MAIL_FROM=ckan@localhost | ||
CKAN_MAX_UPLOAD_SIZE_MB=100 | ||
TZ=UTC | ||
|
||
# Solr | ||
SOLR_IMAGE_VERSION=2.10-solr9 | ||
CKAN_SOLR_URL=http://$W9_ID-solr:8983/solr/ckan | ||
TEST_CKAN_SOLR_URL=http://$W9_ID-solr:8983/solr/ckan | ||
|
||
# Redis | ||
REDIS_VERSION=6 | ||
CKAN_REDIS_URL=redis://$W9_ID-redis:6379/1 | ||
TEST_CKAN_REDIS_URL=redis://$W9_ID-redis:6379/1 | ||
|
||
# Datapusher | ||
DATAPUSHER_VERSION=0.0.21 | ||
CKAN_DATAPUSHER_URL=http://$W9_ID-datapusher:8800 | ||
CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://$W9_ID:5000 | ||
|
||
# Extensions | ||
CKAN__PLUGINS="image_view text_view datatables_view datastore datapusher envvars" | ||
CKAN__HARVEST__MQ__TYPE=redis | ||
CKAN__HARVEST__MQ__HOSTNAME=redis | ||
CKAN__HARVEST__MQ__PORT=6379 | ||
CKAN__HARVEST__MQ__REDIS_DB=1 |
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,93 +1,86 @@ | ||
# 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 | ||
# docs: https://docs.ckan.org/en/2.11/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 | ||
ckan-base: | ||
container_name: $W9_ID | ||
image: $W9_REPO:$W9_VERSION | ||
env_file: | ||
- .env | ||
ports: | ||
- $W9_HTTP_PORT_SET:5000 | ||
volumes: | ||
- ckan_storage:/var/lib/ckan | ||
- 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"] | ||
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 | ||
datapusher: | ||
container_name: $W9_ID-datapusher | ||
image: $W9_REPO-datapusher:${DATAPUSHER_VERSION} | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"] | ||
interval: 60s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
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 | ||
db: | ||
container_name: $W9_ID-postgres | ||
image: ckan/ckan-postgres-dev:2.11 | ||
environment: | ||
- POSTGRES_USER | ||
- POSTGRES_PASSWORD | ||
- POSTGRES_DB | ||
- CKAN_DB_USER | ||
- CKAN_DB_PASSWORD | ||
- CKAN_DB | ||
- DATASTORE_READONLY_USER | ||
- DATASTORE_READONLY_PASSWORD | ||
- DATASTORE_DB | ||
volumes: | ||
- ./src/postgresql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | ||
- pg_data:/var/lib/postgresql/data | ||
restart: unless-stopped | ||
env_file: | ||
- .env | ||
healthcheck: | ||
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] | ||
|
||
solr: | ||
container_name: $W9_ID-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: | ||
container_name: $W9_ID-redis | ||
image: redis:6 | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "-e", "QUIT"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
redis: | ||
container_name: $W9_ID-redis | ||
image: redis:${REDIS_VERSION} | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "redis-cli", "-e", "QUIT"] | ||
|
||
volumes: | ||
ckan_storage: | ||
postgres_data: | ||
solr_data: | ||
|
||
ckan_storage: | ||
pg_data: | ||
solr_data: | ||
pip_cache: | ||
site_packages: | ||
vscode_server: | ||
|
||
networks: | ||
default: | ||
name: ${W9_NETWORK} | ||
external: true | ||
default: | ||
name: $W9_NETWORK | ||
external: true |
1 change: 1 addition & 0 deletions
1
apps/ckan/src/postgresql/docker-entrypoint-initdb.d/.gitattributes
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 @@ | ||
*.sh text eol=lf |
7 changes: 7 additions & 0 deletions
7
apps/ckan/src/postgresql/docker-entrypoint-initdb.d/10_create_ckandb.sh
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,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL | ||
CREATE ROLE "$CKAN_DB_USER" NOSUPERUSER CREATEDB CREATEROLE LOGIN PASSWORD '$CKAN_DB_PASSWORD'; | ||
CREATE DATABASE "$CKAN_DB" OWNER "$CKAN_DB_USER" ENCODING 'utf-8'; | ||
EOSQL |
7 changes: 7 additions & 0 deletions
7
apps/ckan/src/postgresql/docker-entrypoint-initdb.d/20_create_datastore.sh
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,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL | ||
CREATE ROLE "$DATASTORE_READONLY_USER" NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN PASSWORD '$DATASTORE_READONLY_PASSWORD'; | ||
CREATE DATABASE "$DATASTORE_DB" OWNER "$CKAN_DB_USER" ENCODING 'utf-8'; | ||
EOSQL |
7 changes: 7 additions & 0 deletions
7
apps/ckan/src/postgresql/docker-entrypoint-initdb.d/30_setup_test_databases.sh
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,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL | ||
CREATE DATABASE ckan_test OWNER "$CKAN_DB_USER" ENCODING 'utf-8'; | ||
CREATE DATABASE datastore_test OWNER "$CKAN_DB_USER" ENCODING 'utf-8'; | ||
EOSQL |
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
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,14 +1,13 @@ | ||
W9_REPO=harness/gitness | ||
W9_DIST=community | ||
W9_VERSION=latest | ||
W9_POWER_PASSWORD=1PrMxExC45LsCT | ||
|
||
W9_HTTP_PORT_SET=9001 | ||
W9_ID=gitness | ||
W9_DIST='community' | ||
W9_VERSION='latest' | ||
W9_POWER_PASSWORD='w0K#h9xzbzc8ht3a' | ||
W9_HTTP_PORT_SET='9001' | ||
W9_ID='gitness' | ||
W9_HTTP_PORT=3000 | ||
W9_LOGIN_USER=[email protected] | ||
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD | ||
W9_URL=internet_ip | ||
W9_URL='internet_ip' | ||
W9_URL_REPLACE=true | ||
W9_URL_WITH_PORT=true | ||
W9_NETWORK=websoft9 | ||
|
@@ -23,7 +22,7 @@ GITNESS_HTTP_PORT=$W9_HTTP_PORT | |
# you You can leave out the W9_HTTP_PORT_SET, | ||
# the GITNESS_URL_BASE=http://$W9_URL | ||
# if you don't have domain, you have to use the W9_URL and W9_HTTP_PORT_SET | ||
GITNESS_URL_BASE=http://$W9_WRL | ||
GITNESS_URL_BASE=http://$W9_URL | ||
GITNESS_USER_SIGNUP_ENABLED=false | ||
GITNESS_CI_CONTAINER_NETWORKS=$W9_NETWORK | ||
GITNESS_URL_CONTAINER=http://$W9_ID:$W9_HTTP_PORT | ||
GITNESS_URL_CONTAINER=http://$W9_ID:$W9_HTTP_PORT |
Oops, something went wrong.