Skip to content

Commit a5ddff0

Browse files
author
Adarsh Pyarelal
authored
Fixes to Dockerization, adding docker-compose.yml (#511)
* Autoformatting delphi_rest_api.cpp with clang-format * Changing indent from 2 to 4 * Adding program options to set host and port in delphi_rest_api * Adding .clang-format * Docker and docker-compose now work on macOS * Adding docker-compose.linux.yml, not sure if it works yet * Making get_system_status script independent of invocation working directory * minor edit * removing docker-compose.linux.yml * formatting delphi_rest_api.cpp
1 parent 7320c0c commit a5ddff0

File tree

6 files changed

+147
-110
lines changed

6 files changed

+147
-110
lines changed

.clang-format

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
DerivePointerAlignment: false
2+
IndentWidth: 4
23
PointerAlignment: Left
3-
44
BinPackArguments: false
55
BinPackParameters: false
66
BreakBeforeBraces: Custom
77
BraceWrapping:
88
BeforeElse: true
99
BeforeCatch: true
10-
IndentWidth: 2
11-
AccessModifierOffset: 0
10+
NamespaceIndentation: All
1211
CommentPragmas: '^\\.+'
13-
IndentCaseLabels: true

Dockerfile

+14-16
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ENV MODEL_FILES=/delphi/data/source_model_files
1010

1111
RUN apt-get update \
1212
&& apt-get -y --no-install-recommends install \
13+
ca-certificates \
1314
build-essential \
1415
libboost-all-dev \
1516
pkg-config \
@@ -28,26 +29,23 @@ RUN apt-get update \
2829
nlohmann-json3-dev
2930

3031
# build served from source
31-
RUN curl -LO https://github.com/meltwater/served/archive/refs/tags/v1.6.0.tar.gz; \
32-
tar -xzf v1.6.0.tar.gz; \
33-
cd served-1.6.0; \
34-
mkdir build; \
35-
cd build; \
36-
cmake ..; \
37-
make -j `nproc` install; \
38-
cd ..
32+
RUN curl -LO https://github.com/meltwater/served/archive/refs/tags/v1.6.0.tar.gz \
33+
&& tar -xzf v1.6.0.tar.gz \
34+
&& cd served-1.6.0 \
35+
&& mkdir build \
36+
&& cd build \
37+
&& cmake .. \
38+
&& make -j `nproc` install \
39+
&& cd ..
3940

4041
COPY . /delphi
4142
WORKDIR /delphi
4243

4344
RUN mkdir -p data && curl http://vanga.sista.arizona.edu/delphi_data/delphi.db -o data/delphi.db
4445

4546
# build delphi_rest_api
46-
RUN mkdir build; \
47-
cd build; \
48-
cmake .. -DBUILD_PYTHON_BINDINGS=OFF; \
49-
make -j `nproc` delphi_rest_api; \
50-
cd ..
51-
52-
# start the delphi_rest_api
53-
ENTRYPOINT ./build/delphi_rest_api
47+
RUN mkdir build \
48+
&& cd build \
49+
&& cmake .. -DBUILD_PYTHON_BINDINGS=OFF \
50+
&& make -j `nproc` delphi_rest_api \
51+
&& cd ..

0 commit comments

Comments
 (0)