]> Untitled Git - lemmy.git/blobdiff - docker/Dockerfile
docker-compose: Add init to UI (#3248)
[lemmy.git] / docker / Dockerfile
index 4da87a1d8416aee32802c27657910bae0c08eb8d..4293790311fbbbc08d815b83f52df4a35e6af4f2 100644 (file)
@@ -20,7 +20,8 @@ RUN --mount=type=cache,target=/app/target \
 # Release mode build
 RUN \
     if [ "$RUST_RELEASE_MODE" = "release" ] ; then \
-      cargo build --target ${CARGO_BUILD_TARGET} --release \
+      echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs" \
+      && cargo build --target ${CARGO_BUILD_TARGET} --release \
       && cp ./target/$CARGO_BUILD_TARGET/$RUST_RELEASE_MODE/lemmy_server /app/lemmy_server; \
     fi
 
@@ -33,5 +34,4 @@ RUN apk add libpq
 # Copy resources
 COPY --from=builder /app/lemmy_server /app/lemmy
 
-EXPOSE 8536
 CMD ["/app/lemmy"]