-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
76 lines (70 loc) · 1.98 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
version: '3.9'
services:
# Ti Broish NestJS API
ti-broish-api:
build:
context: .
target: development
volumes:
- .:/usr/src/app
- ./node_modules:/usr/src/app/node_modules
command: npm run start:dev
networks:
- ti-broish-network
ports:
- ${PORT:-4000}:${PORT:-4000}
- ${DEBUG_PORT:-9229}:${DEBUG_PORT:-9229}
depends_on:
- ti-broish-db
- ti-broish-cache
links:
- ti-broish-db:ti-broish-db
- ti-broish-cache:ti-broish-cache
# Ti Broish PostgreSQL Database
ti-broish-db:
image: 'postgres:13-alpine'
# Make Postgres log to a file.
# More on logging with Postgres: https://www.postgresql.org/docs/current/static/runtime-config-logging.html
command: postgres -c logging_collector=on -c log_statement=all -c log_destination=stderr -c log_directory=/logs
restart: always
environment:
# Provide the password via an environment variable. If the variable is unset or empty, use a default password
- POSTGRES_PASSWORD=${DATABASE_PASSWORD:-ti-broish}
volumes:
# Persist the data between container invocations
- tiBroishDbVolume:/var/lib/postgresql/data
# Persist logs
- ./var/log:/logs
# Provide initial bootstrap SQL script to create default database
- ./scripts/init.sql:/docker-entrypoint-initdb.d/10-init.sql
networks:
- ti-broish-network
ports:
- '5432:5432'
# Ti Broish Redis Cache
ti-broish-minio:
image: minio/minio
networks:
- ti-broish-network
ports:
- '9000:9000'
- '9001:9001'
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: miniopass
command: server --console-address ":9001" /data
# Ti Broish Redis Cache
ti-broish-cache:
image: 'redis:6-alpine'
networks:
- ti-broish-network
ports:
- '6379:6379'
networks:
ti-broish-network:
driver: bridge
volumes:
tiBroishDbVolume:
minio_storage: