Compare commits

...

3 Commits

Author SHA1 Message Date
cd55f1641c
Fix Alpine build 2024-10-28 21:18:43 -07:00
Juansecu
bc8882d2e8
BUILD - Expose ports used by the application server in Dockerfile 2024-10-28 21:02:52 -07:00
Juansecu
359de79eaa
BUILD - Optimize Dockerfile by using alpine as base image 2024-10-28 21:02:35 -07:00
2 changed files with 23 additions and 8 deletions

View File

@ -1,36 +1,49 @@
# build
FROM debian:stable-slim AS build
FROM alpine:3 as build
WORKDIR /usr/src/app
RUN apt-get -y update && apt-get install -y \
RUN apk update && apk upgrade && apk add \
linux-headers \
git \
clang \
clang18 \
make \
libsqlite3-dev
sqlite-dev
COPY src ./src
COPY vendor ./vendor
COPY .git ./.git
COPY Makefile CMakeLists.txt version.h.in ./
RUN sed -i 's/^CC=clang$/&-18/' Makefile
RUN sed -i 's/^CXX=clang++$/&-18/' Makefile
RUN make nosandbox -j$(nproc)
# prod
FROM debian:stable-slim
FROM alpine:3
ENV AUTHENTICATION_PORT 23000
ENV MONITORING_PORT 8003
ENV SHARDING_PORT 23001
WORKDIR /usr/src/app
RUN apt-get -y update && apt-get install -y \
libsqlite3-dev
RUN apk update && apk upgrade && apk add \
libstdc++ \
sqlite-dev
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
COPY sql ./sql
EXPOSE $AUTHENTICATION_PORT
EXPOSE $MONITORING_PORT
EXPOSE $SHARDING_PORT
CMD ["/bin/fusion"]
EXPOSE 23000/tcp
EXPOSE 23001/tcp
EXPOSE 8001/tcp
EXPOSE 8003/tcp
LABEL Name=openfusion Version=1.6.0

View File

@ -1,6 +1,8 @@
#pragma once
#include <stdint.h>
#include <string>
#include <time.h>
namespace settings {
extern int VERBOSITY;