I have vps server on Ubuntu 20.04. Please help me with this, i'm stuck with it, i'm starting my application with postgresql db with docker compose and get this error, what i'm doing wrong?
My docker-compose.yml
version: '3.8'
x-restart-policy: &restart_policy
restart: unless-stopped
services:
discord-bot:
<< : *restart_policy
depends_on:
- "postgres"
container_name: discord-bot
build:
context: .
dockerfile: DiscordBot.Application/Dockerfile
environment:
- ENVIRONMENT=Release
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
postgres:
<< : *restart_policy
image: postgres:latest
container_name: discordBot-db
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
command: ["-c", "shared_buffers=512MB", "-c", "max_connections=500"]
expose:
- '5432'
ports:
- '5432:5432'
volumes:
- ./dockervolumes/postgress/srv/postgresql/data:/var/lib/postgresql/data
My env file:
POSTGRES_HOST_AUTH_METHOD=trust
POSTGRES_DB=My_dbname
POSTGRES_USER=postgres
POSRGRES_PASSWORD=my_pass
What i'm doing wrong?