initial docker setup
This commit is contained in:
13
.dockerignore
Normal file
13
.dockerignore
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
.gitignore
|
||||||
|
|
||||||
|
frontend/dist
|
||||||
|
frontend/.nuxt
|
||||||
|
frontend/.output
|
||||||
|
frontend/README.md
|
||||||
|
frontend/.prettierrc
|
||||||
|
frontend/.prettierignore
|
||||||
|
frontend/.gitignore
|
||||||
|
frontend/node_modules
|
||||||
|
|
||||||
|
backend/target
|
||||||
|
backend/.gitignore
|
||||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
FROM oven/bun:debian AS frontend-dependency-installer
|
||||||
|
WORKDIR /usr/src/warren
|
||||||
|
|
||||||
|
COPY frontend/package.json frontend/bun.lock ./
|
||||||
|
RUN bun install --frozen-lockfile --ignore-scripts
|
||||||
|
|
||||||
|
|
||||||
|
FROM node:bookworm AS frontend-builder
|
||||||
|
WORKDIR /usr/src/warren
|
||||||
|
|
||||||
|
COPY --from=frontend-dependency-installer /usr/src/warren/ .
|
||||||
|
COPY frontend/ ./
|
||||||
|
RUN npm run generate
|
||||||
|
|
||||||
|
|
||||||
|
FROM rust:bookworm AS backend-builder
|
||||||
|
WORKDIR /usr/src/warren
|
||||||
|
|
||||||
|
COPY backend/ .
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
|
||||||
|
FROM debian:bookworm
|
||||||
|
WORKDIR /var/lib/warren
|
||||||
|
|
||||||
|
COPY --from=backend-builder /usr/src/warren/target/release/warren /usr/bin/warren
|
||||||
|
COPY --from=frontend-builder /usr/src/warren/dist ./frontend
|
||||||
|
|
||||||
|
ENTRYPOINT ["warren"]
|
||||||
14
compose.yaml
Normal file
14
compose.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
services:
|
||||||
|
warren:
|
||||||
|
image: 'warren:latest'
|
||||||
|
container_name: 'warren'
|
||||||
|
build: '.'
|
||||||
|
postgres:
|
||||||
|
image: 'postgres:17'
|
||||||
|
container_name: 'warren-db'
|
||||||
|
volumes:
|
||||||
|
- './postgres-data:/var/lib/postgresql/data'
|
||||||
|
environment:
|
||||||
|
- 'POSTGRES_PASSWORD=pg'
|
||||||
|
ports:
|
||||||
|
- '5432:5432/tcp'
|
||||||
Reference in New Issue
Block a user