diff --git a/Dockerfile b/Dockerfile index 16609e1..d82e9c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,24 +2,18 @@ FROM rust:alpine WORKDIR /usr/src/app -RUN apk add git musl-dev +RUN apk add --update musl-dev openssl openssl-dev COPY public/ public/ -COPY void-be/ void-be/ - -# We don't need all the front end directory files -RUN mkdir void-fe -COPY void-fe/src/ void-fe/src/ -COPY void-fe/data/ void-fe/data/ -COPY void-fe/Cargo.toml void-fe/Cargo.toml - +COPY data/ data/ COPY src/ src/ -COPY templates/ templates/ COPY Cargo.toml . -COPY Rocket.toml . +COPY Cargo.lock . +COPY Dioxus.toml . +COPY access_token.key . -RUN cargo install --config "net.git-fetch-with-cli=true" --path . +ENV OPENSSL_NO_VENDOR=1 +RUN cargo fetch && cargo install dioxus-cli --locked +RUN dx build --release -ENV RUST_ADDRESS=0.0.0.0 - -CMD ["cargo", "run", "--release"] +CMD ["dx", "serve", "--release"] diff --git a/docker-compose.yml b/docker-compose.yml index 726e408..5ada074 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,4 +7,4 @@ services: build: context: . ports: - - "8345:8345" + - "8080:8345"