Compare commits

...

2 Commits

Author SHA1 Message Date
CakeLancelot
233d21ecd7
Fix copy/paste error in docker-compose.yml 2024-05-07 23:01:09 -05:00
Gent Semaj
54327b0c23
Docker improvements (#274) 2024-05-07 22:11:14 -05:00
3 changed files with 22 additions and 8 deletions

View File

@ -1 +0,0 @@
version.h

View File

@ -1,4 +1,5 @@
FROM debian:latest # build
FROM debian:latest as build
WORKDIR /usr/src/app WORKDIR /usr/src/app
@ -8,14 +9,24 @@ clang \
make \ make \
libsqlite3-dev libsqlite3-dev
COPY . ./ COPY src ./src
COPY vendor ./vendor
COPY .git ./.git
COPY Makefile CMakeLists.txt version.h.in ./
RUN make -j8 RUN make -j8
# tabledata should be copied from the host; # prod
# clone it there before building the container FROM debian:latest
#RUN git submodule update --init --recursive
CMD ["./bin/fusion"] WORKDIR /usr/src/app
LABEL Name=openfusion Version=0.0.1 RUN apt-get -y update && apt-get install -y \
libsqlite3-dev
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
COPY sql ./sql
CMD ["/bin/fusion"]
LABEL Name=openfusion Version=0.0.2

View File

@ -6,6 +6,10 @@ services:
build: build:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
volumes:
- ./config.ini:/usr/src/app/config.ini
- ./database.db:/usr/src/app/database.db
- ./tdata:/usr/src/app/tdata
ports: ports:
- "23000:23000" - "23000:23000"
- "23001:23001" - "23001:23001"