-
Notifications
You must be signed in to change notification settings - Fork 36
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
7 changed files
with
24 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,2 @@ | ||
FROM postgres:11 | ||
# ADD openstreetmap-postgres-init.sh /docker-entrypoint-initdb.d/ | ||
RUN rm /etc/apt/sources.list.d/pgdg.list | ||
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list | ||
RUN sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list | ||
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list | ||
RUN apt-get update && apt-get -y install apt-transport-https | ||
RUN echo "deb [ signed-by=/usr/local/share/keyrings/postgres.gpg.asc ] https://apt-archive.postgresql.org/pub/repos/apt/ stretch-pgdg main 11" >/etc/apt/sources.list.d/pgdg.list | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
postgresql-server-dev-11 \ | ||
make \ | ||
build-essential \ | ||
postgresql-11-postgis-2.5 \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
ADD functions/functions.sql /usr/local/share/osm-db-functions.sql | ||
ADD docker_postgres.sh /docker-entrypoint-initdb.d/ | ||
RUN mkdir -p db | ||
RUN mkdir -p lib | ||
ADD functions/ db/functions/ | ||
ADD lib/quad_tile/ lib/quad_tile/ | ||
|
||
RUN make -C db/functions/ | ||
RUN chown -R postgres lib/ | ||
RUN chown -R postgres db/ | ||
FROM postgres:14 | ||
ADD openstreetmap-postgres-init.sh /docker-entrypoint-initdb.d/ |
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 |
---|---|---|
|
@@ -26,30 +26,30 @@ sed -i -e 's/smtp_password: null/smtp_password: "'$MAILER_PASSWORD'"/g' $workdir | |
sed -i -e 's/[email protected]/'$MAILER_FROM'/g' $workdir/config/settings.yml | ||
sed -i -e 's/smtp_port: 25/smtp_port: '$MAILER_PORT'/g' $workdir/config/settings.yml | ||
|
||
### SET UP ID KEY | ||
### SETTING UP UP OAUTH-2 ID KEY FOR iD | ||
sed -i -e 's/id_application: ""/id_application: "'$OPENSTREETMAP_id_key'"/g' $workdir/config/settings.yml | ||
|
||
## SET UP OAUTH ID AND KEY | ||
### SETTING UP OAUTH-2 ID KEY WEBSITE | ||
sed -i -e 's/OAUTH_CLIENT_ID/'$OAUTH_CLIENT_ID'/g' $workdir/config/settings.yml | ||
# sed -i -e 's/OAUTH_KEY/'$OAUTH_KEY'/g' $workdir/config/settings.yml | ||
sed -i -e 's/OAUTH_KEY/'$OAUTH_KEY'/g' $workdir/config/settings.yml | ||
|
||
#### Setup env vars for memcached server | ||
#### SETTING UP ENV VARS FOR MEMCACHED SERVER | ||
sed -i -e 's/#memcache_servers: \[\]/memcache_servers: "'$OPENSTREETMAP_memcache_servers'"/g' $workdir/config/settings.yml | ||
|
||
## SET NOMINATIM URL | ||
### SETTING UP NOMINATIM URL | ||
sed -i -e 's/nominatim.openstreetmap.org/'$NOMINATIM_URL'/g' $workdir/config/settings.yml | ||
|
||
# SET OVERPASS URL | ||
#### SETTING UP OVERPASS URL | ||
sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/config/settings.yml | ||
sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/views/site/export.html.erb | ||
sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/assets/javascripts/index/export.js | ||
|
||
## Set Permissions | ||
chmod 0775 /var/www/log | ||
touch /var/www/log/production.log | ||
chmod 0664 /var/www/log/production.log | ||
### SETTING UP ORGANIZATION | ||
sed -i -e 's/OpenStreetMap/'$ORGANIZATION_NAME'/g' $workdir/config/settings.yml | ||
ORGANIZATION_NAME_LOWER=$(echo "$ORGANIZATION_NAME" | tr '[:upper:]' '[:lower:]') | ||
sed -i -e 's/openstreetmap/'"$ORGANIZATION_NAME_LOWER"'/g' "$workdir/config/settings.yml" | ||
|
||
# Add DOORKEEPER_SIGNING_KEY | ||
# ADDING DOORKEEPER_SIGNING_KEY | ||
openssl genpkey -algorithm RSA -out private.pem | ||
chmod 400 /var/www/private.pem | ||
export DOORKEEPER_SIGNING_KEY=$(cat /var/www/private.pem | sed -e '1d;$d' | tr -d '\n') | ||
|
@@ -70,9 +70,8 @@ while "$flag" = true; do | |
fi | ||
sleep 2 | ||
done & | ||
|
||
# time rails i18n:js:export assets:precompile | ||
bundle exec rails db:migrate | ||
|
||
/usr/local/bin/openstreetmap-cgimap \ | ||
--port=8000 \ | ||
--daemon \ | ||
|
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