-
Notifications
You must be signed in to change notification settings - Fork 147
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
Homme Zwaagstra
committed
Mar 27, 2014
1 parent
694f5bd
commit f4eda8d
Showing
7 changed files
with
61 additions
and
22 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
# <http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/>. | ||
# | ||
|
||
FROM phusion/baseimage:0.9.8 | ||
FROM phusion/baseimage:0.9.9 | ||
MAINTAINER Homme Zwaagstra <[email protected]> | ||
|
||
# Set the locale. This affects the encoding of the Postgresql template | ||
|
@@ -17,6 +17,7 @@ ENV LANG C.UTF-8 | |
RUN update-locale LANG=C.UTF-8 | ||
|
||
# Ensure `add-apt-repository` is present | ||
RUN apt-get update -y | ||
RUN apt-get install -y software-properties-common python-software-properties | ||
|
||
# Mapnik requires a recent version of Boost | ||
|
@@ -96,12 +97,17 @@ RUN sed --file /tmp/postgresql.conf.sed --in-place /etc/postgresql/9.1/main/post | |
RUN mkdir -p /etc/my_init.d | ||
ADD shmmax.sh /etc/my_init.d/shmmax.sh | ||
|
||
# Create a `postgresql` `runit` service | ||
ADD postgresql /etc/sv/postgresql | ||
RUN update-service --add /etc/sv/postgresql | ||
|
||
# Create an `apache2` `runit` service | ||
ADD apache2 /etc/sv/apache2 | ||
RUN update-service --add /etc/sv/apache2 | ||
|
||
# Create a `renderd` `runit` service | ||
ADD renderd /etc/sv/renderd | ||
RUN update-service --add /etc/sv/renderd | ||
|
||
# Clean up APT when done | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
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,14 @@ | ||
#!/bin/sh | ||
|
||
## | ||
# Runit check script for postgresql | ||
# | ||
# This script loops infinitely until it sees the 4 postgres pids | ||
# | ||
|
||
pid_count=0 | ||
while [ "$pid_count" -lt 3 ] | ||
do | ||
sleep 1 | ||
pid_count=`pidof postgres | grep -o ' ' | wc -l` | ||
done |
Empty file.
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,13 @@ | ||
#!/bin/sh | ||
|
||
## | ||
# Runit run script for postgresql | ||
# | ||
|
||
# If the database has been persisted in a volume, it may need | ||
# permissions setting. | ||
chown -R postgres /var/lib/postgresql/ || exit 1 | ||
|
||
exec /sbin/setuser postgres /usr/lib/postgresql/9.1/bin/postgres \ | ||
-D /var/lib/postgresql/9.1/main \ | ||
-c config_file=/etc/postgresql/9.1/main/postgresql.conf |
Empty file.
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