From f349a2adc0839fc89ffd7c545f4753779460fb40 Mon Sep 17 00:00:00 2001 From: phoenix Date: Sun, 13 Apr 2025 13:58:49 -0400 Subject: [PATCH] Docker cleanup --- .dockerignore.yaml | 2 ++ Dockerfile | 4 +--- docker-compose.yaml | 16 ---------------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.dockerignore.yaml b/.dockerignore.yaml index dc3b873..100a850 100644 --- a/.dockerignore.yaml +++ b/.dockerignore.yaml @@ -5,6 +5,8 @@ pkg/ # Ignore git directory .git/ +.gitea/ + # Ignore environment files (configure via docker-compose instead) .env* auth_db.env* diff --git a/Dockerfile b/Dockerfile index 4f3a66d..9722239 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,8 +35,6 @@ RUN --mount=type=ssh mkdir src && \ COPY src ./src # If you have other directories like `templates` or `static`, copy them too COPY .env ./.env -# COPY auth_db.env.docker ./auth_db.env -COPY auth_db.env.docker ./auth_db.env COPY migrations ./migrations # << --- SSH MOUNT ADDED HERE --- >> @@ -65,7 +63,7 @@ COPY --from=builder /usr/src/app/target/release/icarus_auth . COPY --from=builder /usr/src/app/.env . # COPY --from=builder /usr/src/app/auth_db.env.docker auth_db.env # COPY --from=builder /usr/src/app/auth_db.env.docker ./auth_db.env -COPY --from=builder /usr/src/app/auth_db.env . +# COPY --from=builder /usr/src/app/auth_db.env . COPY --from=builder /usr/src/app/migrations ./migrations # Expose the port your Axum app listens on (e.g., 3000 or 8000) diff --git a/docker-compose.yaml b/docker-compose.yaml index ddd4567..8dd5162 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,20 +7,9 @@ services: container_name: icarus_auth # Optional: Give the container a specific name ports: # Map host port 8000 to container port 3000 (adjust as needed) - # Format: "HOST_PORT:CONTAINER_PORT" - "8000:3000" - # environment: - # Pass environment variables to your Rust application - # 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:password@db:5432/icarus_auth - # Add any other environment variables your app needs - # APP_HOST: 0.0.0.0 - # APP_PORT: 3000 env_file: - .env - # - auth_db.env depends_on: auth_db: condition: service_healthy # Wait for the DB to be healthy before starting the app @@ -35,15 +24,10 @@ services: POSTGRES_USER: ${POSTGRES_USER:-icarus_op} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} POSTGRES_DB: ${POSTGRES_DB:-icarus_auth} - # env_file: - # - auth_db.env.docker volumes: # Persist database data using a named volume - postgres_data:/var/lib/postgresql/data ports: [] - # Optional: Expose port 5432 ONLY if you need to connect directly from your host machine (e.g., for debugging) - # - "5432:5432" - # pass: healthcheck: # Checks if Postgres is ready to accept connections test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]