-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathdocker-compose.yml
74 lines (65 loc) · 2.17 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
version: '3.1'
# Default ${TEAMCITY_VERSION} is defined in .env file
# ./buildserver_pgdata - Posgres DB data
# ./data - TeamCity data directory
# ./teamcity-server-logs1 - logs of primary TeamCity server
# ./teamcity-server-logs2 - logs of secondary TeamCity server (running-builds node)
# ./teamcity-agent-conf1 - conf directory for the build agent
services:
db:
image: postgres
restart: always
ports:
- 5433:5432
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: test
POSTGRES_DB: buildserver
volumes:
- ./buildserver_pgdata:/var/lib/postgresql/data
nginx:
image: nginx:1.27.0
ports:
- 8222:8222
volumes:
- ./nginx:/etc/nginx/conf.d
depends_on:
teamcity:
condition: service_healthy
node1:
condition: service_healthy
teamcity:
image: jetbrains/teamcity-server:${TEAMCITY_VERSION}
volumes:
- ./data:/data/teamcity_server/datadir
- ./teamcity-server-logs1:/opt/teamcity/logs
ports:
- 8111:8111
healthcheck:
test: ["CMD", "curl", "-f", "http://teamcity:8111/healthCheck/ready"]
node1:
image: jetbrains/teamcity-server:${TEAMCITY_VERSION}
volumes:
- ./data:/data/teamcity_server/datadir
- ./node1_data:/data/teamcity_server/node_datadir
- ./teamcity-server-logs2:/opt/teamcity/logs
ports:
- 8112:8111
environment:
TEAMCITY_SERVER_OPTS: -Dteamcity.server.nodeId=node1 -Dteamcity.server.rootURL=http://teamcity:8111 -Dteamcity.data.path=/data/teamcity_server/datadir -Dteamcity.node.data.path=/data/teamcity_server/node_datadir
healthcheck:
test: ["CMD", "curl", "-f", "http://node1:8111/healthCheck/ready"]
teamcity-agent1:
image: jetbrains/teamcity-agent:${TEAMCITY_VERSION}
environment:
SERVER_URL: http://nginx:8222
volumes:
- ./teamcity-agent-conf1:/data/teamcity_agent/conf
- /var/run/docker.sock:/var/run/docker.sock
teamcity-agent2:
image: jetbrains/teamcity-agent:${TEAMCITY_VERSION}
environment:
SERVER_URL: http://nginx:8222
volumes:
- ./teamcity-agent-conf2:/data/teamcity_agent/conf
- /var/run/docker.sock:/var/run/docker.sock