-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-without-elk.yml
More file actions
61 lines (56 loc) · 1.34 KB
/
docker-compose-without-elk.yml
File metadata and controls
61 lines (56 loc) · 1.34 KB
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
version: "3.9"
services:
db:
image: postgres:12-bullseye
container_name: postgres_db
environment:
POSTGRES_USER: storage_admin # DB Admin
POSTGRES_PASSWORD: THw7l0bxvPPkWUhP # DB Admin password
POSTGRES_DB: strg_users_db # name of the database
ports:
- "5435:5432" # Open port for PostgreSQL
volumes:
- ./docker-data/postgres:/var/lib/postgresql/data
- ./db_init/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- app_network
deploy:
resources:
limits:
cpus: '0.3'
memory: 512MB
restart_policy:
condition: on-failure
max_attempts: 3
delay: 5s
window: 20s
app:
build:
context: . # path to your Dockerfile
dockerfile: Dockerfile
container_name: python_app
volumes:
- ./logs:/app/logs
depends_on:
- db
environment:
DATABASE_URL: postgresql://storage_admin:THw7l0bxvPPkWUhP@db:5432/strg_users_db
ports:
- "8000:8000" # Open port for the application
networks:
- app_network
deploy:
resources:
limits:
cpus: '0.3'
memory: 512MB
restart_policy:
condition: on-failure
max_attempts: 3
delay: 5s
window: 20s
volumes:
postgres_data:
networks:
app_network:
driver: bridge