Compare commits
3 Commits
19ef4d592b
...
d86301919d
| Author | SHA1 | Date | |
|---|---|---|---|
| d86301919d | |||
| 47e53a19b9 | |||
| d0a29196dd |
41
.env.example
41
.env.example
@@ -3,8 +3,7 @@
|
||||
# HOW TO USE:
|
||||
# 1. Copy this file to .env: cp .env.example .env
|
||||
# 2. Change the REQUIRED values below
|
||||
# 3. Optionally change ports if you have conflicts
|
||||
# 4. Run: docker-compose up --build
|
||||
# 3. Run: docker-compose up --build
|
||||
|
||||
# =============================================================================
|
||||
# REQUIRED - Change these values in production!
|
||||
@@ -18,38 +17,22 @@ MEILI_MASTER_KEY=change-me-in-production
|
||||
API_BOOTSTRAP_TOKEN=change-me-in-production
|
||||
|
||||
# =============================================================================
|
||||
# Port Configuration (change only if you have port conflicts)
|
||||
# =============================================================================
|
||||
|
||||
# Main application ports
|
||||
API_PORT=8080
|
||||
INDEXER_PORT=8081
|
||||
BACKOFFICE_PORT=8082
|
||||
|
||||
# Infrastructure ports
|
||||
MEILI_PORT=7700
|
||||
POSTGRES_PORT=5432
|
||||
|
||||
# =============================================================================
|
||||
# Service URLs (auto-generated from ports above - don't change unless you know what you're doing)
|
||||
# Service Configuration
|
||||
# =============================================================================
|
||||
|
||||
# API Service
|
||||
API_LISTEN_ADDR=0.0.0.0:${API_PORT}
|
||||
API_BASE_URL=http://api:${API_PORT}
|
||||
API_LISTEN_ADDR=0.0.0.0:8080
|
||||
API_BASE_URL=http://api:8080
|
||||
|
||||
# Indexer Service
|
||||
INDEXER_LISTEN_ADDR=0.0.0.0:${INDEXER_PORT}
|
||||
INDEXER_LISTEN_ADDR=0.0.0.0:8081
|
||||
INDEXER_SCAN_INTERVAL_SECONDS=5
|
||||
|
||||
# Backoffice Web UI
|
||||
# Uses BACKOFFICE_PORT from above
|
||||
|
||||
# Meilisearch Search Engine
|
||||
MEILI_URL=http://meilisearch:${MEILI_PORT}
|
||||
MEILI_URL=http://meilisearch:7700
|
||||
|
||||
# PostgreSQL Database
|
||||
DATABASE_URL=postgres://stripstream:stripstream@postgres:${POSTGRES_PORT}/stripstream
|
||||
DATABASE_URL=postgres://stripstream:stripstream@postgres:5432/stripstream
|
||||
|
||||
# =============================================================================
|
||||
# Storage Configuration
|
||||
@@ -64,3 +47,13 @@ LIBRARIES_ROOT_PATH=/libraries
|
||||
# Default: ../libraries (relative to infra/docker-compose.yml)
|
||||
# You can change this to an absolute path on your machine
|
||||
LIBRARIES_HOST_PATH=../libraries
|
||||
|
||||
# =============================================================================
|
||||
# Port Configuration
|
||||
# =============================================================================
|
||||
# To change ports, edit docker-compose.yml directly:
|
||||
# - API: change "7080:8080" to "YOUR_PORT:8080"
|
||||
# - Indexer: change "7081:8081" to "YOUR_PORT:8081"
|
||||
# - Backoffice: change "7082:8082" to "YOUR_PORT:8082"
|
||||
# - Meilisearch: change "7700:7700" to "YOUR_PORT:7700"
|
||||
# - PostgreSQL: change "6432:5432" to "YOUR_PORT:5432"
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
FROM rust:1-bookworm AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Install sccache for faster builds
|
||||
RUN cargo install sccache --locked
|
||||
ENV RUSTC_WRAPPER=sccache
|
||||
ENV SCCACHE_DIR=/sccache
|
||||
|
||||
COPY Cargo.toml ./
|
||||
COPY apps/api/Cargo.toml apps/api/Cargo.toml
|
||||
COPY apps/indexer/Cargo.toml apps/indexer/Cargo.toml
|
||||
@@ -11,7 +16,9 @@ COPY apps/indexer/src apps/indexer/src
|
||||
COPY crates/core/src crates/core/src
|
||||
COPY crates/parsers/src crates/parsers/src
|
||||
|
||||
RUN cargo build --release -p api
|
||||
# Build with sccache (cache persisted between builds via Docker cache mount)
|
||||
RUN --mount=type=cache,target=/sccache \
|
||||
cargo build --release -p api
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget unrar-free poppler-utils && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
FROM rust:1-bookworm AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Install sccache for faster builds
|
||||
RUN cargo install sccache --locked
|
||||
ENV RUSTC_WRAPPER=sccache
|
||||
ENV SCCACHE_DIR=/sccache
|
||||
|
||||
COPY Cargo.toml ./
|
||||
COPY apps/api/Cargo.toml apps/api/Cargo.toml
|
||||
COPY apps/indexer/Cargo.toml apps/indexer/Cargo.toml
|
||||
@@ -11,7 +16,9 @@ COPY apps/indexer/src apps/indexer/src
|
||||
COPY crates/core/src crates/core/src
|
||||
COPY crates/parsers/src crates/parsers/src
|
||||
|
||||
RUN cargo build --release -p indexer
|
||||
# Build with sccache (cache persisted between builds via Docker cache mount)
|
||||
RUN --mount=type=cache,target=/sccache \
|
||||
cargo build --release -p indexer
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget unrar-free && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
POSTGRES_USER: stripstream
|
||||
POSTGRES_PASSWORD: stripstream
|
||||
ports:
|
||||
- "${POSTGRES_PORT:-5432}:5432"
|
||||
- "6432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
@@ -20,11 +20,11 @@ services:
|
||||
env_file:
|
||||
- ../.env
|
||||
ports:
|
||||
- "${MEILI_PORT:-7700}:7700"
|
||||
- "7700:7700"
|
||||
volumes:
|
||||
- meili_data:/meili_data
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${MEILI_PORT:-7700}/health"]
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:7700/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -54,7 +54,7 @@ services:
|
||||
env_file:
|
||||
- ../.env
|
||||
ports:
|
||||
- "${API_PORT:-8080}:8080"
|
||||
- "7080:8080"
|
||||
volumes:
|
||||
- ${LIBRARIES_HOST_PATH:-../libraries}:/libraries
|
||||
depends_on:
|
||||
@@ -65,7 +65,7 @@ services:
|
||||
meilisearch:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${API_PORT:-8080}/health"]
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8080/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -77,7 +77,7 @@ services:
|
||||
env_file:
|
||||
- ../.env
|
||||
ports:
|
||||
- "${INDEXER_PORT:-8081}:8081"
|
||||
- "7081:8081"
|
||||
volumes:
|
||||
- ${LIBRARIES_HOST_PATH:-../libraries}:/libraries
|
||||
depends_on:
|
||||
@@ -88,7 +88,7 @@ services:
|
||||
meilisearch:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${INDEXER_PORT:-8081}/health"]
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8081/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -103,12 +103,12 @@ services:
|
||||
- PORT=8082
|
||||
- HOST=0.0.0.0
|
||||
ports:
|
||||
- "${BACKOFFICE_PORT:-8082}:8082"
|
||||
- "7082:8082"
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://host.docker.internal:${BACKOFFICE_PORT:-8082}/health"]
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8082/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user