forked from ckan/ckan-docker
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #61 from mjanez/ckan-2.9.9
Update plugins and image fixes (nginx, dev)
- Loading branch information
Showing
12 changed files
with
97 additions
and
49 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
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,16 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Update ckanext-scheming and ckanext-facet_scheming settings defined in the env var | ||
echo "Set up ckanext-facet_scheming. Clear index" | ||
# Update ckanext-scheming and ckanext-scheming_dcat settings defined in the env var | ||
echo "Set up ckanext-scheming_dcat. Clear index" | ||
ckan -c $CKAN_INI search-index clear | ||
|
||
echo "Loading ckanext-scheming and ckanext-facet_scheming settings into ckan.ini" | ||
echo "Loading ckanext-scheming and ckanext-scheming_dcat settings into ckan.ini" | ||
ckan config-tool $CKAN_INI \ | ||
"scheming.dataset_schemas=$SCHEMA_CKANEXT_SCHEMING_DATASET_SCHEMA" \ | ||
"scheming.group_schemas=$SCHEMA_CKANEXT_SCHEMING_GROUP_SCHEMAS" \ | ||
"scheming.organization_schemas=$SCHEMA_CKANEXT_SCHEMING_ORGANIZATION_SCHEMAS" \ | ||
"scheming.presets=$SCHEMA_CKANEXT_SCHEMING_PRESETS" \ | ||
"facet_scheming.facet_list=$CKANEXT__FACET_FACET_LIST" | ||
"scheming.dataset_schemas=$CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA" \ | ||
"scheming.group_schemas=$CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS" \ | ||
"scheming.organization_schemas=$CKANEXT__SCHEMING_DCAT_ORGANIZATION_SCHEMAS" \ | ||
"scheming.presets=$CKANEXT__SCHEMING_DCAT_PRESETS" \ | ||
"scheming_dcat.facet_list=$CKANEXT__SCHEMING_DCAT_FACET_LIST" \ | ||
"scheming_dcat.organization_custom_facets=$CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS" \ | ||
"scheming_dcat.group_custom_facets=$CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS" | ||
|
||
echo "ckanext-facet_scheming. Rebuild index" | ||
echo "ckanext-scheming_dcat. Rebuild index" | ||
ckan -c $CKAN_INI search-index rebuild |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
#!/bin/bash | ||
|
||
# Set the necessary variables | ||
CONTAINER_NAME="db" | ||
DATABASE_NAME="ckan" | ||
POSTGRES_USER="ckan" | ||
POSTGRES_PASSWORD="your_postgres_password" | ||
BACKUP_DIRECTORY="/path/to/your/backup/directory" | ||
DATE=$(date +%Y%m%d%H%M%S) | ||
MONTH=$(date +%m) | ||
YEAR=$(date +%Y) | ||
|
||
# Create the monthly backup directory if it doesn't exist | ||
mkdir -p "$BACKUP_DIRECTORY/monthly/$YEAR-$MONTH" | ||
|
||
# Run the backup command | ||
docker exec -e PGPASSWORD=$POSTGRES_PASSWORD $CONTAINER_NAME pg_dump -U $POSTGRES_USER -Fc $DATABASE_NAME > "$BACKUP_DIRECTORY/monthly/$YEAR-$MONTH/ckan_backup_$DATE.dump" | ||
|
||
# Compress the dump files into a zip archive | ||
cd "$BACKUP_DIRECTORY/monthly/$YEAR-$MONTH" || exit | ||
zip "backup_${YEAR}-${MONTH}.zip" *.dump | ||
|
||
# Remove the original dump files | ||
rm -f *.dump |
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,12 @@ | ||
#!/bin/bash | ||
|
||
# Set the necessary variables | ||
CONTAINER_NAME="db" | ||
DATABASE_NAME="ckan" | ||
POSTGRES_USER="ckan" | ||
POSTGRES_PASSWORD="your_postgres_password" | ||
BACKUP_DIRECTORY="/path/to/your/backup/directory" | ||
DATE=$(date +%Y%m%d%H%M%S) | ||
|
||
# Run the backup command | ||
docker exec -e PGPASSWORD=$POSTGRES_PASSWORD $CONTAINER_NAME pg_dump -U $POSTGRES_USER -Fc $DATABASE_NAME > $BACKUP_DIRECTORY/ckan_backup_$DATE.dump |
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
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