-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (57 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
68 lines (57 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ruby:3.4-bullseye
RUN apt update -y && apt install -y \
build-essential \
bzip2 \
clang \
cmake \
gzip \
libboost-dev \
libboost-program-options-dev \
libexpat1-dev \
libgeos-dev \
libosmium2-dev \
libpq-dev \
libproj-dev \
libprotozero-dev \
postgresql-client \
pyosmium \
python-is-python3 \
python3-pyosmium \
python3-requests \
ruby-dev \
ruby-json \
wget
WORKDIR /srv/
RUN git clone https://github.com/osmcode/osm-postgresql-experiments.git && \
cd osm-postgresql-experiments && \
git checkout 3ddc1ca && \
mkdir build && \
cd build && \
cmake .. && \
make install
WORKDIR /srv/
# Custom patch, wating for https://github.com/osmcode/osmium-tool/issues/282
ADD osmium-tool-merge-osc-deleted.diff .
RUN git clone https://github.com/osmcode/osmium-tool.git && \
cd osmium-tool && \
git checkout v1.13.0 && \
patch -p1 < ../osmium-tool-merge-osc-deleted.diff && \
mkdir build && \
cd build && \
cmake .. && \
make install
WORKDIR /srv/app
ADD Gemfile Gemfile.lock ./
RUN bundle config --global silence_root_warning 1
RUN bundle install
RUN cd /usr/local/bundle/gems/levenshtein-ffi-1.1.0/ext/levenshtein && \
make
ADD . ./
EXPOSE 9000
HEALTHCHECK \
--start-interval=1s \
--start-period=30s \
--interval=30s \
--timeout=20s \
--retries=5 \
CMD curl -f http://127.0.0.1:9000/up || exit 1