[TC-642] modify template (#3)
https://eva.avroid.tech/desk/Task/TC-642#be-dorabotat-shablon-servisov-backend Дорабатываем шаблон сервисов по требованиям: https://eva.avroid.tech/project/Document/DOC-002710#trebovanija-k-versijam Reviewed-on: https://git.avroid.tech/Templates/template-backend-service/pulls/3 Reviewed-by: Victor Stratov <victor.stratov@avroid.team> Reviewed-by: Petr Brovchenko <petr.brovchenko@avroid.team> Co-authored-by: Nadezhda <nadezhda.lavrentieva@avroid.team> Co-committed-by: Nadezhda <nadezhda.lavrentieva@avroid.team>
This commit is contained in:
committed by
Nadezhda Lavrentieva
parent
a4b2c99c25
commit
ac441a108b
@@ -1,40 +1,45 @@
|
||||
networks:
|
||||
cloud-messenger:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgresql: {}
|
||||
|
||||
services:
|
||||
template-backend-service:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file: "local.env"
|
||||
container_name: template-backend-service
|
||||
volumes:
|
||||
- ./:/app
|
||||
environment:
|
||||
POSTGRES_DSN: "postgresql://test:test@cloud-postgres.avroid.cloud:5432/messenger"
|
||||
POSTGRES_USER: "test"
|
||||
POSTGRES_PASSWORD: "test"
|
||||
POSTGRES_HOST: "cloud-postgres.avroid.cloud"
|
||||
POSTGRES_DB: "messenger"
|
||||
|
||||
PORT: "8000"
|
||||
|
||||
SCYLLADB_HOST: "cloud-scylla.avroid.cloud"
|
||||
SCYLLADB_PORT: "9042"
|
||||
SCYLLADB_USER: "test"
|
||||
SCYLLADB_PASSWORD: "test"
|
||||
SCYLLADB_KEYSPACE: "messenger"
|
||||
PORT: 8000
|
||||
ENVIRONMENT: local
|
||||
LOGGING: '{"json_enabled": true, "level": "INFO"}'
|
||||
ENVIRONMENT: "production"
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:14.8
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: "test"
|
||||
POSTGRES_PASSWORD: "test"
|
||||
POSTGRES_HOST: "cloud-postgres.avroid.cloud"
|
||||
POSTGRES_DB: "messenger"
|
||||
POSTGRES_DSN: postgresql://messenger:messenger@postgresql:5432/messenger
|
||||
networks:
|
||||
- cloud-messenger
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- postgresql
|
||||
|
||||
postgresql:
|
||||
image: postgres:14.0
|
||||
container_name: template-backend-service-db
|
||||
restart: always
|
||||
volumes:
|
||||
- postgresql:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: messenger
|
||||
POSTGRES_PASSWORD: messenger
|
||||
POSTGRES_DB: messenger
|
||||
networks:
|
||||
- cloud-messenger
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -d postgres" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user