Skip to content

Commit

Permalink
fix: docker assets/ 404 (#15)
Browse files Browse the repository at this point in the history
* fix: docker assets/ 404

* chore(devcontainer): add docker-in-docker feature

* chore: version 0.3.8
  • Loading branch information
storopoli authored Mar 10, 2024
1 parent 716e859 commit 0e3e40d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:latest",
"features": {
"ghcr.io/devcontainers/features/node:latest": {}
"ghcr.io/devcontainers/features/node:latest": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stoic-quotes"
version = "0.3.7"
version = "0.3.8"
edition = "2021"
authors = ["Jose Storopoli <jose@storopoli.io>"]
description = "Stoic quotes API backend"
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ WORKDIR /usr/src/app

# Add labels for OCI annotations
LABEL org.opencontainers.image.source="https://github.com/storopoli/stoic-quotes" \
org.opencontainers.image.description="Stoic Quotes" \
org.opencontainers.image.licenses="MIT"
org.opencontainers.image.description="Stoic Quotes" \
org.opencontainers.image.licenses="MIT"

# Copy project's Cargo.toml file
COPY ./Cargo.toml ./
Expand All @@ -37,8 +37,12 @@ RUN cargo build --release --target x86_64-unknown-linux-musl
# Start a new stage from a slim version of Debian to reduce the size of the final image
FROM debian:buster-slim

WORKDIR /usr/src/app

# Copy the binary from the builder stage to the new stage
COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/stoic-quotes /usr/local/bin/stoic-quotes
# Copy the assets/ from the builder stage to the new stage
COPY --from=builder /usr/src/app/assets /usr/src/app/assets

# Expose port 3000
EXPOSE 3000
Expand Down

0 comments on commit 0e3e40d

Please sign in to comment.