82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
services:
|
||
# web:
|
||
# build: ./app
|
||
# image: positioning
|
||
# command: >
|
||
# sh -c "
|
||
# python manage.py makemigrations --noinput &&
|
||
# python manage.py migrate --noinput &&
|
||
# gunicorn --workers=2 --bind 0.0.0.0:8000 project.wsgi:application
|
||
# "
|
||
# ports:
|
||
# - '8000:8000'
|
||
# env_file:
|
||
# - .env
|
||
## volumes:
|
||
## - ./app/static:/home/app/web/static/
|
||
# depends_on:
|
||
# postgres:
|
||
# condition: service_healthy
|
||
|
||
# redis:
|
||
# container_name: redis
|
||
# image: redis
|
||
# restart: always
|
||
# volumes:
|
||
# - redis_data:/data
|
||
# ports:
|
||
# - "6379:6379"
|
||
# healthcheck:
|
||
# test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
|
||
# interval: 1s
|
||
# timeout: 3s
|
||
# retries: 5
|
||
|
||
postgres:
|
||
image: postgres:15
|
||
volumes:
|
||
- postgres_data:/var/lib/postgresql/data/
|
||
env_file:
|
||
- .env
|
||
ports:
|
||
# - '5432:5432'
|
||
- '127.0.0.1:5432:5432'
|
||
healthcheck:
|
||
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
|
||
interval: 10s
|
||
timeout: 60s
|
||
retries: 3
|
||
start_period: 10s
|
||
|
||
# keycloak-postgres: # Изменяем имя сервиса с postgres на keycloak-postgres
|
||
# image: postgres
|
||
# volumes:
|
||
# - postgres_data:/var/lib/postgresql/data
|
||
# environment:
|
||
# POSTGRES_DB: keycloak
|
||
# POSTGRES_USER: keycloak
|
||
# POSTGRES_PASSWORD: password
|
||
#
|
||
# keycloak:
|
||
# image: quay.io/keycloak/keycloak:latest
|
||
# command: start-dev
|
||
# environment:
|
||
# KC_DB: postgres
|
||
# KC_DB_URL: jdbc:postgresql://keycloak-postgres/keycloak # Обновляем URL для подключения к PostgreSQL
|
||
# KC_DB_USERNAME: keycloak
|
||
# KC_DB_PASSWORD: password
|
||
# KC_HTTP_ENABLED: true
|
||
# KC_HEALTH_ENABLED: true
|
||
# KEYCLOAK_ADMIN: admin
|
||
# KEYCLOAK_ADMIN_PASSWORD: admin
|
||
# ports:
|
||
# - 8080:8080
|
||
# restart: always
|
||
# depends_on:
|
||
# - keycloak-postgres # Обновляем зависимость
|
||
|
||
|
||
volumes:
|
||
postgres_data:
|
||
redis_data:
|