From 6a3738d20a7c728edbc162fa78b224f0e89c7575 Mon Sep 17 00:00:00 2001 From: ryzij Date: Sun, 30 Aug 2026 18:26:15 +0300 Subject: [PATCH] Add docker-compose.example.yml --- docker-compose.example.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docker-compose.example.yml diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..ba90191 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,28 @@ +services: + api: + build: + context: . + dockerfile: AMessanger.API/Dockerfile + ports: + - "5000:8080" + depends_on: + - db + environment: + ConnectionStrings__DefaultConnection: Host=db;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD} + Jwt__Key: ${JWT_KEY} + Jwt__ExpiresMinutes: "${JWT_EXPIRES_MINUTES}" + Jwt__Issuer: "${JWT_ISSUER}" + Jwt__Audience: "#{JWT_AUDIENCE}" + + db: + image: postgres:17 + restart: always + environment: + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + volumes: + - pg_data:/var/lib/postgresql/data + +volumes: + pg_data: \ No newline at end of file