|
| 1 | +services: |
| 2 | + keycloak-postgres: |
| 3 | + image: postgres:15.15 |
| 4 | + volumes: |
| 5 | + - "keycloak-data:/var/lib/postgresql" |
| 6 | + environment: |
| 7 | + POSTGRES_DB: "keycloak" |
| 8 | + POSTGRES_USER: "keycloak" |
| 9 | + POSTGRES_PASSWORD: "password" |
| 10 | + |
| 11 | + keycloak: |
| 12 | + image: quay.io/keycloak/keycloak:26.4 |
| 13 | + environment: |
| 14 | + KC_DB: "postgres" |
| 15 | + KC_DB_URL: "jdbc:postgresql://keycloak-postgres:5432/keycloak" |
| 16 | + KC_DB_USERNAME: "keycloak" |
| 17 | + KC_DB_PASSWORD: "password" |
| 18 | + |
| 19 | + KC_HOSTNAME: "localhost" |
| 20 | + KC_HOSTNAME_PORT: 8080 |
| 21 | + KC_HOSTNAME_STRICT: false |
| 22 | + |
| 23 | + KEYCLOAK_ADMIN: "admin" |
| 24 | + KEYCLOAK_ADMIN_PASSWORD: "admin" |
| 25 | + command: start-dev --import-realm |
| 26 | + depends_on: |
| 27 | + - keycloak-postgres |
| 28 | + volumes: |
| 29 | + - "./keycloak:/opt/keycloak/data/import:ro" |
| 30 | + ports: |
| 31 | + - "8080:8080" |
| 32 | + |
| 33 | + postgres: |
| 34 | + image: postgres:15.15 |
| 35 | + environment: |
| 36 | + POSTGRES_DB: "postgres" |
| 37 | + POSTGRES_USER: "postgres" |
| 38 | + POSTGRES_PASSWORD: "password" |
| 39 | + volumes: |
| 40 | + - "postgres-data:/var/lib/postgresql" |
| 41 | + ports: |
| 42 | + - "5432:5432" |
| 43 | + |
| 44 | + redis: |
| 45 | + image: redis:8.4 |
| 46 | + command: redis-server --requirepass password |
| 47 | + ports: |
| 48 | + - "6379:6379" |
| 49 | + |
| 50 | + backend: |
| 51 | + build: backend |
| 52 | + ports: |
| 53 | + - "8000:80" |
| 54 | + environment: |
| 55 | + ENV: "development" |
| 56 | + |
| 57 | + DATABASE_HOSTNAME: "postgres" |
| 58 | + DATABASE_NAME: "postgres" |
| 59 | + DATABASE_USERNAME: "postgres" |
| 60 | + DATABASE_PASSWORD: "password" |
| 61 | + |
| 62 | + REDIS_HOSTNAME: "redis" |
| 63 | + REDIS_PASSWORD: "password" |
| 64 | + |
| 65 | + ISSUER_URI: "http://keycloak:8080/realms/tasks" |
| 66 | + PUBLIC_ISSUER_URI: "http://localhost:8080/realms/tasks" |
| 67 | + CLIENT_ID: "tasks-backend" |
| 68 | + CLIENT_SECRET: "tasks-secret" |
| 69 | + depends_on: |
| 70 | + - postgres |
| 71 | + - redis |
| 72 | + |
| 73 | + proxy: |
| 74 | + build: proxy |
| 75 | + environment: |
| 76 | + BACKEND_HOST: backend:80 |
| 77 | + FRONTEND_HOST: host.docker.internal:3000 |
| 78 | + extra_hosts: |
| 79 | + - "host.docker.internal:host-gateway" |
| 80 | + ports: |
| 81 | + - "80:80" |
| 82 | + depends_on: |
| 83 | + - backend |
| 84 | + |
| 85 | +volumes: |
| 86 | + keycloak-data: |
| 87 | + postgres-data: |
0 commit comments