Merge pull request #3083 from migurski/migurski/docker-compose-cleanups
Post-merge Docker Compose cleanup issues
This commit is contained in:
commit
5761371a56
6 changed files with 9 additions and 9 deletions
|
@ -71,6 +71,7 @@ You can now use Docker to load this extract into your local Docker-based OSM ins
|
|||
docker-compose run --rm web osmosis \
|
||||
-verbose \
|
||||
--read-pbf district-of-columbia-latest.osm.pbf \
|
||||
--log-progress \
|
||||
--write-apidb \
|
||||
host="db" \
|
||||
database="openstreetmap" \
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM ubuntu:20.04
|
|||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install system packages
|
||||
# Install system packages then clean up to minimize image size
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
build-essential \
|
||||
|
@ -30,7 +30,7 @@ RUN apt-get update \
|
|||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install current Osmosis
|
||||
# Install compatible Osmosis to help users import sample data in a new instance
|
||||
RUN curl -OL https://github.com/openstreetmap/osmosis/releases/download/0.47.2/osmosis-0.47.2.tgz \
|
||||
&& tar -C /usr/local -xzf osmosis-0.47.2.tgz
|
||||
|
||||
|
@ -45,6 +45,7 @@ ADD Gemfile Gemfile.lock /app/
|
|||
RUN gem install bundler \
|
||||
&& bundle install
|
||||
|
||||
# Install NodeJS packages
|
||||
# Install NodeJS packages using yarnpkg
|
||||
# `bundle exec rake yarn:install` will not work
|
||||
ADD package.json yarn.lock /app/
|
||||
RUN yarnpkg install
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||
|
||||
require "bundler/setup" # Set up gems listed in the Gemfile.
|
||||
require "bootsnap/setup" if ENV.fetch("ENABLE_BOOTSNAP", "true") == "true" # Speed up boot time by caching expensive operations.
|
||||
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
||||
|
|
|
@ -14,9 +14,6 @@ services:
|
|||
- web-images:/home/osm/images
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# https://github.com/Shopify/bootsnap/issues/262
|
||||
ENABLE_BOOTSNAP: 'false'
|
||||
command: bundle exec rails s -p 3000 -b '0.0.0.0'
|
||||
depends_on:
|
||||
- db
|
||||
|
|
|
@ -4,4 +4,4 @@ FROM postgres:11
|
|||
ADD docker/postgres/openstreetmap-postgres-init.sh /docker-entrypoint-initdb.d/
|
||||
|
||||
# Custom database functions are in a SQL file.
|
||||
ADD db/functions/functions.sql /usr/local/sbin/osm-db-functions.sql
|
||||
ADD db/functions/functions.sql /usr/local/share/osm-db-functions.sql
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
set -ex
|
||||
|
||||
# Create 'openstreetmap' user
|
||||
# Password and superuser privilege are needed to successfully run test suite
|
||||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" <<-EOSQL
|
||||
CREATE USER openstreetmap SUPERUSER PASSWORD 'openstreetmap';
|
||||
GRANT ALL PRIVILEGES ON DATABASE openstreetmap TO openstreetmap;
|
||||
|
@ -11,4 +12,4 @@ EOSQL
|
|||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -c "CREATE EXTENSION btree_gist" openstreetmap
|
||||
|
||||
# Define custom functions
|
||||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -f "/usr/local/sbin/osm-db-functions.sql" openstreetmap
|
||||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -f "/usr/local/share/osm-db-functions.sql" openstreetmap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue