-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
147 lines (136 loc) Β· 3.56 KB
/
docker-compose.yml
File metadata and controls
147 lines (136 loc) Β· 3.56 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: '3'
services:
neo4j:
container_name: neo4j
image: neo4j:latest
restart: always
environment:
NEO4J_AUTH: ${NEO4J_AUTH}
ports:
- "7474:7474"
- "7687:7687"
volumes:
- ./nextpage-db/neo4j/data:/data
- ./nextpage-db/neo4j/logs:/logs
networks:
- npage
postgresql:
container_name: postgresql
image: postgres:12.0-alpine
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./nextpage-db/postgres-data:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- npage
pgadmin:
# μ¬μ©ν μ΄λ―Έμ§
image: dpage/pgadmin4
# 컨ν
μ΄λ μ€ν μ μ¬μμ
restart: always
# 컨ν
μ΄λλͺ
μ€μ
container_name: pgadmin4
user: root
# μ κ·Ό ν¬νΈ μ€μ (컨ν
μ΄λ μΈλΆ:컨ν
μ΄λ λ΄λΆ)
ports:
- "5050:80"
# νκ²½ λ³μ μ€μ
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
# λ³Όλ₯¨ μ€μ
volumes:
- ./nextpage-db/pgadmin/:/var/lib/pgadmin
networks:
- npage
# μ€νλ§ λ‘μ»¬λ‘ μ€ν μ μ£Όμ μ²λ¦¬νκ³ DBλ§ λ컀 λΉλ
springboot:
build:
context: .
dockerfile: Dockerfile
restart: always
depends_on:
- neo4j
- postgresql
ports:
- 8080:8080
container_name: springboot
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
NEO4J_URI: ${SPRING_NEO4J_URI}
NEO4J_PASSWORD: ${SPRING_NEO4J_PASSWORD}
networks:
- npage
# Monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
user: root
ports:
- "3001:3000"
# env_file:
# - './monitoring/grafana/env.grafana'
volumes:
- './monitoring/grafana:/var/lib/grafana'
restart: always
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
depends_on:
- springboot
networks:
- npage
k6:
image: grafana/k6:latest
container_name: k6
ports:
- "6565:6565"
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
volumes:
- ./monitoring/k6:/scripts
extra_hosts:
- "host.docker.internal:host-gateway" # νΈμ€νΈμ μ°κ²°(λ‘컬ν
μ€νΈλ₯Ό μν¨)
command: ["run", "/scripts/test_script.js"]
networks:
- npage
influxdb:
image: influxdb:1.8
ports:
- "8086:8086"
environment:
- INFLUXDB_DB=k6
restart: on-failure # μ€ν¨ μ μ¬μμ
networks:
- npage
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./monitoring/prometheus/config:/etc/prometheus
- ./monitoring/prometheus/volume:/prometheus
ports:
- 9090:9090
command:
- '--web.enable-lifecycle' # api μ¬μμμμ΄ μ€μ νμΌ reload
- '--storage.tsdb.path=/prometheus'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
user: root
restart: always
networks:
- npage
networks:
npage:
driver: bridge