-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
119 lines (109 loc) · 2.65 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.7'
services:
# django:
# build: ./backend
# container_name: django
# command: python manage.py runserver 0.0.0.0:8000
# volumes:
# - ./backend:/usr/src/app
# ports:
# - "8000:8000"
# environment:
# PYTHONUNBUFFERED: 1
# depends_on:
# - pgdb
# - migration
# - minio
# migration:
# build: ./backend
# container_name: migration
# command: bash -c "python manage.py makemigrations && python manage.py migrate --noinput && python manage.py fill_db"
# volumes:
# - ./backend:/usr/src/app
# depends_on:
# - pgdb
pgdb:
image: postgres:16.0-alpine
container_name: pgdb
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- 127.0.0.1:5432:5432
volumes:
- type: volume
source: pgdbdata
target: /var/lib/postgresql/data
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: nest_test
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/www/nest_test/docker-volumes/pgadmin
ports:
- 127.0.0.1:5050:80
restart: unless-stopped
minio:
hostname: minio/minio:latest
image: quay.io/minio/minio:RELEASE.2022-10-15T19-57-03Z
container_name: minio
command: server --console-address ":9001" /data/
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
expose:
- "9000"
- "9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
volumes:
- minio-data:/data
createbucket:
image: minio/mc:latest
container_name: createbucket
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add --api s3v4 s3 http://minio:9000 minio minio123;
/usr/bin/mc mb s3/images;
/usr/bin/mc anonymous set public s3/images;
"
nginx:
image: nginx:1.19.2-alpine
container_name: nginx
hostname: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- minio
redis:
container_name: redis
image: redis:6
volumes:
- redis:/data
ports:
- 127.0.0.1:6379:6379
restart: unless-stopped
# frontend:
# build: ./frontend
# container_name: frontend
# ports:
# - "3000:3000"
# environment:
# - VITE_API_URL=http://django:8000
volumes:
pgdbdata: null
minio-data:
redis:
pgadmin: