App now builds with docker
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stage 1: Build the application
|
||||
# Use a specific Rust version for reproducibility. Choose one that matches your development environment.
|
||||
# Using slim variant for smaller base image
|
||||
FROM rust:1.86-slim as builder
|
||||
FROM rust:1.86 as builder
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /usr/src/app
|
||||
@@ -11,7 +11,8 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install build dependencies if needed (e.g., git for cloning)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
pkg-config libssl-dev \
|
||||
pkg-config libssl3 \
|
||||
ca-certificates \
|
||||
openssh-client git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -47,10 +48,10 @@ RUN --mount=type=ssh \
|
||||
|
||||
# Stage 2: Create the final, smaller runtime image
|
||||
# Use a minimal base image like debian-slim or even distroless for security/size
|
||||
FROM debian:bullseye-slim
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# Install runtime dependencies if needed (e.g., SSL certificates)
|
||||
RUN apt-get update && apt-get install -y ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y ca-certificates libssl-dev libssl3 && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /usr/local/bin
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version: '0.3' # Use a recent version
|
||||
version: '3.8' # Use a recent version
|
||||
|
||||
services:
|
||||
# Your Rust Application Service
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
# RUST_LOG: info # Example: Set log level
|
||||
# IMPORTANT: Configure DATABASE_URL to connect to the 'db' service
|
||||
# The hostname 'db' matches the service name defined below.
|
||||
DATABASE_URL: postgresql://icarus_op_test:mypassword@db:5432/icarus_auth_test
|
||||
DATABASE_URL: postgresql://icarus_op:password@db:5432/icarus_auth
|
||||
# Add any other environment variables your app needs
|
||||
# APP_HOST: 0.0.0.0
|
||||
# APP_PORT: 3000
|
||||
@@ -29,9 +29,9 @@ services:
|
||||
container_name: icarus_auth_db # Optional: Give the container a specific name
|
||||
environment:
|
||||
# These MUST match the user, password, and database name in the DATABASE_URL above
|
||||
POSTGRES_USER: icarus_op_test
|
||||
POSTGRES_USER: icarus_op
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: icarus_auth_test
|
||||
POSTGRES_DB: icarus_auth
|
||||
volumes:
|
||||
# Persist database data using a named volume
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
Reference in New Issue
Block a user