@@ -0,0 +1,73 @@
|
||||
version: '3.9'
|
||||
|
||||
services:
|
||||
storage:
|
||||
image: alpine:latest
|
||||
container_name: file-storage-local
|
||||
networks:
|
||||
- app-network-local
|
||||
volumes:
|
||||
- uploads_data_local:/storage:rw
|
||||
command: tail -f /dev/null
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: postgres:17.7
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: no_copy_
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_SHARED_BUFFERS: 512MB
|
||||
POSTGRES_EFFECTIVE_CACHE_SIZE: 1536MB
|
||||
ports:
|
||||
- "54320:5432"
|
||||
volumes:
|
||||
- pgdata_local:/var/lib/postgresql/data
|
||||
- ./init-scripts:/docker-entrypoint-initdb.d:ro
|
||||
container_name: postgres-local
|
||||
networks:
|
||||
app-network-local:
|
||||
aliases:
|
||||
- database
|
||||
|
||||
app:
|
||||
build: .
|
||||
container_name: app-backend-local
|
||||
environment:
|
||||
JAVA_TOOL_OPTIONS: "-Xmx2g -Xms1g"
|
||||
FILE_STORAGE_PATH: /data/uploads
|
||||
POSTGRES_DB: no_copy_
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_HOST: db
|
||||
# Используем local профиль
|
||||
SPRING_PROFILES_ACTIVE: local
|
||||
YANDEX_API_KEY: AQVNyaVaUmgUb1GMCtf5zSEqFxy0woXrcMOOB43q
|
||||
YANDEX_FOLDER_ID: b1gokpdbm6qfpsou8pcd
|
||||
YANDEX_SEARCH_URL: "https://searchapi.api.cloud.yandex.net/v2/image/search_by_image"
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "8080:8080"
|
||||
networks:
|
||||
app-network-local:
|
||||
aliases:
|
||||
- app
|
||||
- backend
|
||||
volumes:
|
||||
- uploads_data_local:/data/uploads:rw
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
pgdata_local:
|
||||
uploads_data_local:
|
||||
|
||||
networks:
|
||||
app-network-local:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user