-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (106 loc) · 2.79 KB
/
docker-compose.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.8'
services:
db:
image: postgres:15-alpine
restart: always
container_name: postgres_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5431:5432" # Map port 5431 on host to port 5432 in the container
volumes:
- postgres_data:/var/lib/postgres/data
# It's an issue
# mongodb:
# image: mongo:latest
# container_name: mongodb
# ports:
# - "27017:27017"
# volumes:
# - mongo_data:/data/db
# - ./configs/mongod.conf:/etc/mongo/mongod.conf
# command: ['mongod', '--config', '/etc/mongo/mongod.conf']
web:
build:
context: .
dockerfile: Dockerfile
# command: sh -c "./scripts/run-migration.sh && uvicorn main:app --reload --host 0.0.0.0 --port 8000"
command: uvicorn main:app --reload --host 0.0.0.0 --port 8000
environment:
FULL_DATABASE_PG_URL: ${FULL_DATABASE_PG_URL_DOCKER_COMPOSE}
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
ports:
- "5050:80"
depends_on:
- db
prometheus:
image: bitnami/prometheus
ports:
- '9090:9090'
volumes:
- ./configs/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=false
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
# Commented for serverless deployment lack of memory
# elasticsearch:
# image: elasticsearch:5.6-alpine
# environment:
# - http.host=0.0.0.0
# - transport.host=localhost
# - network.host=0.0.0.0
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# mem_limit: 1g
# graylog:
# image: graylog/graylog:3.3
# environment:
# - GRAYLOG_PASSWORD=${GRAYLOG_PASSWORD}
# - GRAYLOG_PASSWORD_SHA=${GRAYLOG_PASSWORD_SHA}
# - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
# depends_on:
# - mongodb
# - elasticsearch
# ports:
# # Graylog web interface and REST API
# - 9000:9000
# # Syslog TCP
# - 1514:1514
# # Syslog UDP
# - 1514:1514/udp
# # GELF TCP
# - 12201:12201
# # GELF UDP
# - 12201:12201/udp
volumes:
postgres_data:
mongo_data:
grafana_data:
# default one
networks:
default: