-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
111 lines (103 loc) · 2.79 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
version: "3.8"
services:
app:
build: .
container_name: escrow-agent-app
ports:
- "8080:8080"
depends_on:
- db
# - minio
env_file:
- .env
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- MINIO_ENDPOINT=http://localhost:9000
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
- MINIO_BUCKET_NAME=${MINIO_BUCKET_NAME}
- MINIO_REGION=${MINIO_REGION}
networks:
- escrow-network
db:
image: postgres:13
container_name: escrow-agent-db
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db_init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- escrow-network
# frontend:
# build:
# context: ./frontend
# container_name: escrow-agent-frontend
# ports:
# - "3000:3000"
# environment:
# - NEXT_PUBLIC_API_BASE_URL=http://localhost:8080/api
# - NEXT_PUBLIC_BASE_URL=http://localhost:8080
# networks:
# - escrow-network
# minio:
# image: minio/minio
# container_name: minio
# ports:
# - "9000:9000"
# - "9001:9001"
# environment:
# - MINIO_ROOT_USER=${MINIO_ROOT_USER}
# - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
# volumes:
# - minio_data:/data
# command: server /data --console-address ":9001"
# networks:
# - escrow-network
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
# interval: 30s
# timeout: 10s
# retries: 3
# mc:
# image: minio/mc
# depends_on:
# - minio
# entrypoint: >
# /bin/sh -c "
# sleep 5;
# /usr/bin/mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
# /usr/bin/mc mb myminio/${MINIO_BUCKET_NAME};
# echo '{\"CORSRules\": [{\"AllowedOrigins\": [\"*\"], \"AllowedMethods\": [\"GET\", \"PUT\", \"POST\", \"DELETE\"], \"AllowedHeaders\": [\"*\"], \"ExposeHeaders\": [\"ETag\"], \"MaxAgeSeconds\": 3000}]}' > /tmp/cors.json;
# /usr/bin/mc cors set myminio/${MINIO_BUCKET_NAME} /tmp/cors.json"
# networks:
# - escrow-network
swagger-ui:
image: swaggerapi/swagger-ui
container_name: swagger-ui
ports:
- "8081:8080"
environment:
- SWAGGER_JSON=/swagger/swagger.yml
volumes:
- ./swagger:/swagger
networks:
- escrow-network
volumes:
postgres_data:
# minio_data:
networks:
escrow-network: