diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e04127a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.24.3 AS build-stage + +WORKDIR /app + +COPY . . + +RUN go build + +FROM gcr.io/distroless/base-debian12 AS build-release-stage + +WORKDIR /data + +COPY --from=build-stage /app/auth_service /auth_service +COPY users.json /data/users.json +COPY auth_service.config /data/auth_service.config + +ENTRYPOINT [ "/auth_service" ] \ No newline at end of file diff --git a/aut_service.config.dev b/aut_service.config.dev new file mode 100644 index 0000000..d81250f --- /dev/null +++ b/aut_service.config.dev @@ -0,0 +1,10 @@ +USERS_FILE=users.json +USERS_DB=users.db +ENABLE_SELF_REGISTER=false + +ENABLE_TLS=false +CERT_FILE=/data/file.crt +KEY_FILE=/data/file/key + +SERVER_ADDRESS=0.0.0.0 +SERVER_PORT=8090 \ No newline at end of file diff --git a/auth_service.config b/auth_service.config index a0b4e5c..14aef06 100644 --- a/auth_service.config +++ b/auth_service.config @@ -1,10 +1,10 @@ -USERS_FILE=users.json -USERS_DB=users.db +USERS_FILE=/data/users.json +USERS_DB=/data/users.db ENABLE_SELF_REGISTER=false ENABLE_TLS=false -CERT_FILE=/home/tola/certs/localhost/localhost.crt -KEY_FILE=/home/tola/certs/localhost/localhost.key +CERT_FILE=/data/file.crt +KEY_FILE=/data/file/key -SERVER_ADDRESS=localhost +SERVER_ADDRESS=0.0.0.0 SERVER_PORT=8090 \ No newline at end of file