forked from JetBrains/teamcity-docker-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (39 loc) · 1.18 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
version: '3.1'
# Default ${TEAMCITY_VERSION} is defined in .env file
# ./buildserver_pgdata - Posgres DB data
# ./data_dir - TeamCity data directory
# ./teamcity-server-logs - logs of primary TeamCity server
# ./agents/agent-1/conf - configuration directory for the first build agent
# ./agents/agent-1/conf - configuration directory for the second build agent
services:
db:
image: postgres:latest
restart: always
environment:
- POSTGRES_PASSWORD=teamcity_password
- POSTGRES_USER=teamcity_user
- POSTGRES_DB=teamcity_db
- PG_DATA=/var/lib/postgresql/data
volumes:
- ./buildserver_pgdata:/var/lib/postgresql/data
ports:
- 5433:5432
teamcity:
image: jetbrains/teamcity-server:${TEAMCITY_VERSION}
restart: always
ports:
- "8112:8111"
volumes:
- ./data_dir:/data/teamcity_server/datadir
- ./teamcity-server-logs:/opt/teamcity/logs
depends_on:
- db
teamcity-agent-1:
image: jetbrains/teamcity-agent:${TEAMCITY_VERSION}
restart: always
privileged: true
volumes:
- ./agents/conf:/data/teamcity_agent/conf
environment:
- DOCKER_IN_DOCKER=start
- AGENT_NAME=Agent_1