-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (95 loc) · 2.42 KB
/
docker-compose.yml
File metadata and controls
102 lines (95 loc) · 2.42 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
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
version: '3.8'
services:
postgres:
image: postgres:14-alpine
container_name: nestjs-template-postgres
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nestjs_template
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- nestjs-network
mailhog:
image: mailhog/mailhog
container_name: nestjs-template-mailhog
restart: always
ports:
- '1025:1025' # SMTP server
- '8025:8025' # Web UI
networks:
- nestjs-network
minio:
image: minio/minio:latest
container_name: nestjs-template-minio
restart: always
ports:
- '9000:9000'
- '9001:9001'
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
command: server --console-address ":9001" /data
networks:
- nestjs-network
createbuckets:
image: minio/mc
container_name: nestjs-template-createbuckets
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/public;
/usr/bin/mc mb myminio/private;
/usr/bin/mc anonymous set download myminio/public;
exit 0;
"
networks:
- nestjs-network
# Uncomment if you want to run the app in docker
# api:
# build:
# context: .
# dockerfile: Dockerfile
# container_name: nestjs-template-api
# restart: always
# ports:
# - "3000:3000"
# depends_on:
# - postgres
# - mailhog
# - minio
# environment:
# - NODE_ENV=development
# - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/nestjs_template?schema=public
# - SMTP_HOST=mailhog
# - SMTP_PORT=1025
# - SMTP_USER=
# - SMTP_PASSWORD=
# - SMTP_FROM=noreply@example.com
# - SMTP_SECURE=false
# - STORAGE_DRIVER=minio
# - MINIO_ENDPOINT=minio
# - MINIO_PORT=9000
# - MINIO_ACCESS_KEY=minioadmin
# - MINIO_SECRET_KEY=minioadmin
# - MINIO_USE_SSL=false
# - MINIO_PUBLIC_BUCKET=public
# - MINIO_PRIVATE_BUCKET=private
# - FILE_STORAGE_PUBLIC_URL=http://localhost:9000/public
# networks:
# - nestjs-network
volumes:
postgres_data:
minio_data:
networks:
nestjs-network:
driver: bridge