Skip to content

Commit

Permalink
Deployment Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Jan 19, 2025
1 parent d540583 commit b36979c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 47 deletions.
4 changes: 3 additions & 1 deletion sea-orm-pro/docs/01-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@

6. Deployment

6.1 [Nginx](06-deployment/01-nginx.md)
6.1 [Virtual Machine](06-deployment/01-vm.md)

6.2 [Container](06-deployment/02-container.md)
46 changes: 0 additions & 46 deletions sea-orm-pro/docs/06-deployment/01-nginx.md

This file was deleted.

7 changes: 7 additions & 0 deletions sea-orm-pro/docs/06-deployment/01-vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Virtual Machine

This guide outline the process of deploying to a virtual machine, e.g. AWS EC2 or DigitalOcean Droplets.

Here we start from Ubuntu 24.04 LTS.

TODO
33 changes: 33 additions & 0 deletions sea-orm-pro/docs/06-deployment/02-container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Container

This guide outline the process of building an image for deploying to containerized environments, e.g. Kubernetes.

Here we start from Debian 12.

```Dockerfile
FROM rust:1.81-bookworm AS build

WORKDIR /app

# Copy the source tree
COPY . ./

# Build release
RUN cargo build --release

###############################################################

FROM debian:bookworm-slim

ENV RUST_LOG=info

WORKDIR /app

COPY --from=build /app/target/release/sea-orm-pro-backend-cli /app
COPY config /app/config
COPY pro_admin /app/pro_admin
COPY assets /app/assets
COPY db.sqlite /app

CMD ["/app/sea-orm-pro-backend-cli", "start"]
```

0 comments on commit b36979c

Please sign in to comment.