Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix + enable automatic docker image builds #2995

Merged
merged 17 commits into from
May 13, 2016
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ ADD ./contrib/docker/my_init.d /etc/my_init.d
ADD ./contrib/docker/svc /etc/service
CMD ["/sbin/my_init"]

# Volumes
VOLUME ["/etc/ckan/default"]
VOLUME ["/var/lib/ckan"]
EXPOSE 80

Expand Down
11 changes: 11 additions & 0 deletions contrib/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ckan:
image: 'ckan/ckan:latest'
links:
- db
- solr
ports:
- '80:80'
db:
image: 'ckan/postgresql:latest'
solr:
image: 'ckan/solr:latest'
6 changes: 3 additions & 3 deletions contrib/docker/my_init.d/50_configure
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ write_config () {
}

link_postgres_url () {
local user=$DB_ENV_POSTGRESQL_USER
local pass=$DB_ENV_POSTGRESQL_PASS
local db=$DB_ENV_POSTGRESQL_DB
local user=$DB_ENV_POSTGRES_USER
local pass=$DB_ENV_POSTGRES_PASS
local db=$DB_ENV_POSTGRES_DB
local host=$DB_PORT_5432_TCP_ADDR
local port=$DB_PORT_5432_TCP_PORT
echo "postgresql://${user}:${pass}@${host}:${port}/${db}"
Expand Down
9 changes: 5 additions & 4 deletions contrib/docker/postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM orchardup/postgresql
FROM postgres:latest
MAINTAINER Open Knowledge

# Customize default user/pass/db
ENV POSTGRESQL_USER ckan
ENV POSTGRESQL_PASS ckan
ENV POSTGRESQL_DB ckan
ENV POSTGRES_USER ckan
ENV POSTGRES_PASS ckan
ENV POSTGRES_DB ckan
10 changes: 5 additions & 5 deletions contrib/docker/solr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -q -y install default-jre-headless
# Install Solr
ENV SOLR_HOME /opt/solr/example/solr
ENV SOLR_VERSION 4.8.1
ENV SOLR solr-$SOLR_VERSION

RUN mkdir -p /opt/solr
ADD https://archive.apache.org/dist/lucene/solr/$SOLR_VERSION/$SOLR.tgz /opt/$SOLR.tgz
RUN tar zxf /opt/$SOLR.tgz -C /opt/solr --strip-components 1
ADD https://archive.apache.org/dist/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz /opt/solr-$SOLR_VERSION.tgz
RUN tar zxf /opt/solr-$SOLR_VERSION.tgz -C /opt/solr --strip-components 1

# Install CKAN Solr core
RUN cp -R $SOLR_HOME/collection1/ $SOLR_HOME/ckan/
RUN echo name=ckan > $SOLR_HOME/ckan/core.properties
ADD schema.xml $SOLR_HOME/ckan/conf/schema.xml
ADD https://raw.githubusercontent.com/ckan/ckan/master/ckan/config/solr/schema.xml $SOLR_HOME/ckan/conf/schema.xml

EXPOSE 8983
WORKDIR /opt/solr/example
CMD ["java", "-jar", "start.jar"]
CMD ["java", "-jar", "start.jar"]
1 change: 0 additions & 1 deletion contrib/docker/solr/schema.xml

This file was deleted.