Skip to content

Commit

Permalink
adding logto to docker development
Browse files Browse the repository at this point in the history
  • Loading branch information
moovendhan-v committed Apr 21, 2024
1 parent ed6692e commit 881fd4e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,54 @@ services:
networks:
my_network:
ipv4_address: 172.28.0.3

adminer:
image: adminer
container_name: my_adminer
restart: always
ports:
- "8080:8080"

postgres:
image: postgres:latest
container_name: my_postgres_db
restart: always
environment:
POSTGRES_DB: my_database
POSTGRES_USER: my_user
POSTGRES_PASSWORD: my_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

logto:
depends_on:
postgres:
condition: service_healthy
image: svhd/logto:${TAG-latest}
entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
ports:
- "3001:3001" # Map container port 3001 to host port 3001
- "3002:3002" # Map container port 3002 to host port 3002
environment:
- TRUST_PROXY_HEADER=1
# Use localhost instead of the service name for local testing
- DB_URL=postgres://my_user:my_password@postgres:5432/logto
# Set other environment variables as needed
- ENDPOINT
- ADMIN_ENDPOINT


volumes:
mongodb_data:
redis_data:
postgres_data:

networks:
my_network:
Expand Down

0 comments on commit 881fd4e

Please sign in to comment.