Merge pull request #34 from keitaroinc/alias-ckan
CKAN alias command for 2.7 and 2.8 so it can be forward-compatible with 2.9
This commit is contained in:
commit
8cc21c3b66
|
@ -166,6 +166,9 @@ RUN rm -rf /srv/app/wheels /srv/app/ext_wheels
|
||||||
# Copy necessary scripts
|
# Copy necessary scripts
|
||||||
COPY setup/app ${APP_DIR}
|
COPY setup/app ${APP_DIR}
|
||||||
|
|
||||||
|
# Copy the alias script for paster to be ckan so it's compatible with 2.9
|
||||||
|
COPY setup/bin/ckan /usr/bin/ckan
|
||||||
|
|
||||||
# Create entrypoint directory for children image scripts
|
# Create entrypoint directory for children image scripts
|
||||||
ONBUILD RUN mkdir docker-entrypoint.d
|
ONBUILD RUN mkdir docker-entrypoint.d
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,9 @@ RUN rm -rf /srv/app/wheels /srv/app/ext_wheels
|
||||||
# Copy necessary scripts
|
# Copy necessary scripts
|
||||||
COPY setup/app ${APP_DIR}
|
COPY setup/app ${APP_DIR}
|
||||||
|
|
||||||
|
# Copy the alias script for paster to be ckan so it's compatible with 2.9
|
||||||
|
COPY setup/bin/ckan /usr/bin/ckan
|
||||||
|
|
||||||
# Create entrypoint directory for children image scripts
|
# Create entrypoint directory for children image scripts
|
||||||
ONBUILD RUN mkdir docker-entrypoint.d
|
ONBUILD RUN mkdir docker-entrypoint.d
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# CKAN <2.9 uses paster and the ckan plugin for paster which expects the configuration to be passed
|
||||||
|
# to a subcommand, example: paster --plugin=ckan datastore -c /srv/app/production.ini set-permissions
|
||||||
|
# CKAN >2.9 ckan CLI command expects the configuration option as the second and third parameter
|
||||||
|
# Example: ckan -c /srv/app/production.ini datastore set-permissions
|
||||||
|
#
|
||||||
|
# Shift three arguments so that we can reorder the argument list
|
||||||
|
# ckan -c /srv/app/production.ini datastore set-permissions
|
||||||
|
# becomes
|
||||||
|
# paster --plugin=ckan datastore -c /srv/app/production.ini set-permissions
|
||||||
|
config_switch=$1
|
||||||
|
config_file=$2
|
||||||
|
subcommand=$3
|
||||||
|
shift 3
|
||||||
|
paster --plugin=ckan "$subcommand" "$config_switch" "$config_file" "$@"
|
|
@ -160,6 +160,9 @@ RUN rm -rf /srv/app/wheels /srv/app/ext_wheels
|
||||||
# Copy necessary scripts
|
# Copy necessary scripts
|
||||||
COPY setup/app ${APP_DIR}
|
COPY setup/app ${APP_DIR}
|
||||||
|
|
||||||
|
# Copy the alias script for paster to be ckan so it's compatible with 2.9
|
||||||
|
COPY setup/bin/ckan /usr/bin/ckan
|
||||||
|
|
||||||
# Create entrypoint directory for children image scripts
|
# Create entrypoint directory for children image scripts
|
||||||
ONBUILD RUN mkdir docker-entrypoint.d
|
ONBUILD RUN mkdir docker-entrypoint.d
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,9 @@ RUN rm -rf /srv/app/wheels /srv/app/ext_wheels
|
||||||
# Copy necessary scripts
|
# Copy necessary scripts
|
||||||
COPY setup/app ${APP_DIR}
|
COPY setup/app ${APP_DIR}
|
||||||
|
|
||||||
|
# Copy the alias script for paster to be ckan so it's compatible with 2.9
|
||||||
|
COPY setup/bin/ckan /usr/bin/ckan
|
||||||
|
|
||||||
# Create entrypoint directory for children image scripts
|
# Create entrypoint directory for children image scripts
|
||||||
ONBUILD RUN mkdir docker-entrypoint.d
|
ONBUILD RUN mkdir docker-entrypoint.d
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# CKAN <2.9 uses paster and the ckan plugin for paster which expects the configuration to be passed
|
||||||
|
# to a subcommand, example: paster --plugin=ckan datastore -c /srv/app/production.ini set-permissions
|
||||||
|
# CKAN >2.9 ckan CLI command expects the configuration option as the second and third parameter
|
||||||
|
# Example: ckan -c /srv/app/production.ini datastore set-permissions
|
||||||
|
#
|
||||||
|
# Shift three arguments so that we can reorder the argument list
|
||||||
|
# ckan -c /srv/app/production.ini datastore set-permissions
|
||||||
|
# becomes
|
||||||
|
# paster --plugin=ckan datastore -c /srv/app/production.ini set-permissions
|
||||||
|
config_switch=$1
|
||||||
|
config_file=$2
|
||||||
|
subcommand=$3
|
||||||
|
shift 3
|
||||||
|
paster --plugin=ckan "$subcommand" "$config_switch" "$config_file" "$@"
|
Loading…
Reference in New Issue