Skip to content

Commit feb54be

Browse files
committed
more produciton build items
1 parent 0eb378e commit feb54be

File tree

2 files changed

+11
-26
lines changed

2 files changed

+11
-26
lines changed

deploy/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
aws
2+
awscliv2.zip

deploy/Dockerfile

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
11
FROM rust:1.79 as builder
2-
# Install required packages for cross-compilation and OpenSSL
3-
RUN apt-get update && \
4-
apt-get install -y \
5-
musl-tools \
6-
musl-dev \
2+
RUN apt-get update && apt-get install -y \
3+
pkg-config \
74
libssl-dev \
8-
&& apt-get clean
9-
# Download and install pre-built musl-compatible OpenSSL binaries
10-
RUN wget https://musl.cc/x86_64-linux-musl-cross.tgz && \
11-
tar -xzf x86_64-linux-musl-cross.tgz && \
12-
cp -r x86_64-linux-musl-cross/x86_64-linux-musl/ /usr/local/musl && \
13-
rm -rf x86_64-linux-musl-cross.tgz x86_64-linux-musl-cross
14-
RUN rustup target add x86_64-unknown-linux-musl
5+
&& rm -rf /var/lib/apt/lists/*
156

167
WORKDIR /usr/src/syntaxmakersserver
178
COPY ./server/. .
18-
# Set environment variables for OpenSSL cross-compilation
19-
ENV OPENSSL_DIR=/usr/local/musl \
20-
OPENSSL_LIB_DIR=/usr/local/musl/lib \
21-
OPENSSL_INCLUDE_DIR=/usr/local/musl/include \
22-
PKG_CONFIG_ALLOW_CROSS=1 \
23-
PKG_CONFIG_PATH=/usr/local/musl/lib/pkgconfig \
24-
CC=musl-gcc \
25-
CFLAGS="-I/usr/local/musl/include" \
26-
LDFLAGS="-L/usr/local/musl/lib"
27-
RUN cargo build --target x86_64-unknown-linux-musl --release
28-
RUN find / -name "syntaxmakers-server" 2>/dev/null
299

30-
FROM debian:buster-slim
10+
RUN cargo build --release
11+
RUN echo "Searching for syntaxmakers-server..." && find / -name "syntaxmakers-server" 2>/dev/null
12+
13+
FROM debian:stable-slim
3114
# Install OpenSSL runtime
3215
RUN apt-get update && \
33-
apt-get install -y libssl1.1 && \
16+
apt-get install -y libssl3 && \
3417
apt-get clean
3518
# Copy the compiled binary from the builder image
3619
COPY --from=builder /usr/src/syntaxmakersserver /usr/local/bin/syntaxmakersserver
3720
WORKDIR /usr/local/bin/syntaxmakersserver
38-
ENTRYPOINT ["./target/x86_64-unknown-linux-gnu/release/syntaxmakers-server"]
21+
ENTRYPOINT ["./target/release/syntaxmakers-server"]

0 commit comments

Comments
 (0)