-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.production.yml
83 lines (76 loc) · 1.79 KB
/
docker-compose.production.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
version: '3.1'
services:
nest-api:
env_file:
- .env
image: momo/nest-api-boilerplate
build:
context: .
dockerfile: Dockerfile
#target: production
container_name: nest-api
ports:
- ${SERVER_PORT}:${SERVER_PORT}
command: ['sh', 'scripts/start-api.sh']
networks:
- nestjs-api-boilerplate_network
depends_on:
- redis
- postgres
- minio
postgres:
container_name: nestjs-api-boilerplate_postgres
image: postgres
restart: always
networks:
- nestjs-api-boilerplate_network
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${RDS_USERNAME}
POSTGRES_PASSWORD: ${RDS_PASSWORD}
POSTGRES_DB: ${RDS_DB_NAME}
ports:
- ${RDS_PORT}:${RDS_PORT}
redis:
container_name: nestjs-api-boilerplate_redis
image: redis
ports:
- ${REDIS_PORT}:${REDIS_PORT}
networks:
- nestjs-api-boilerplate_network
volumes:
- redis-data:/data
entrypoint: redis-server --appendonly yes
restart: always
adminer:
container_name: nestjs-api-boilerplate_adminer
image: adminer
restart: always
networks:
- nestjs-api-boilerplate_network
ports:
- ${ADMINER_PORT}:${ADMINER_PORT}
minio:
container_name: nestjs-api-boilerplate_minio
image: minio/minio
volumes:
- minio-data:/data
networks:
- nestjs-api-boilerplate_network
ports:
- ${AWS_S3_PORT}:${AWS_S3_PORT}
environment:
MINIO_ACCESS_KEY: ${AWS_S3_ACCESS_KEY_ID}
MINIO_SECRET_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
command: server /data
networks:
nestjs-api-boilerplate_network:
driver: bridge
volumes:
minio-data:
driver: local
redis-data:
driver: local
postgres-data:
driver: local