Docker cleanup
This commit is contained in:
@@ -5,6 +5,8 @@ pkg/
|
||||
# Ignore git directory
|
||||
.git/
|
||||
|
||||
.gitea/
|
||||
|
||||
# Ignore environment files (configure via docker-compose instead)
|
||||
.env*
|
||||
auth_db.env*
|
||||
|
@@ -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)
|
||||
|
@@ -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"]
|
||||
|
Reference in New Issue
Block a user