File size: 1,294 Bytes
cd66269
 
75aa976
f4dfdc4
 
 
 
 
 
 
 
 
 
 
 
 
cd66269
f4dfdc4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cd66269
6dd0f6c
cd66269
 
75aa976
cd66269
75aa976
cd66269
 
 
f4dfdc4
cd66269
 
 
75aa976
cd66269
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3'

services:
  # db:
  #   image: postgres
  #   environment:
  #     POSTGRES_USER: user
  #     POSTGRES_PASSWORD: password
  #     POSTGRES_DB: mydatabase
  #     POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --no-local"
  #     TZ: UTC
  #   ports:
  #     - "5432:5432"
  #   volumes:
  #     - postgres_data:/var/lib/postgresql/data
  #   command: postgres -c max_connections=500 -c shared_buffers=1GB -c effective_cache_size=3GB -c maintenance_work_mem=512MB

  # grafana:
  #   image: grafana/grafana:latest
  #   restart: always
  #   ports:
  #     - "3000:3000"
  #   environment:
  #     GF_AUTH_ANONYMOUS_ENABLED: "true"
  #     GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
  #     GF_AUTH_ANONYMOUS_ORG_NAME: "Main Org."
  #     GF_SECURITY_ADMIN_USER: user
  #     GF_SECURITY_ADMIN_PASSWORD: password
  #     DATABASE_TYPE: postgres
  #     DATABASE_HOST: db
  #     DATABASE_PORT: 5432
  #     DATABASE_NAME: mydatabase
  #     DATABASE_USER: user
  #     DATABASE_PASSWORD: password
  app:
    restart: always
    build:
      context: .
    ports:
      - "8000:8000"
    depends_on:
      - db
    environment:
      - DATABASE_URL=postgresql://user:password@db:5432/mydatabase
    command: uvicorn App.app:app --host 0.0.0.0 --port 8000 --workers 4



volumes:
  postgres_data: