Docker cleanup
This commit is contained in:
@@ -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