This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (74 loc) · 2.2 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
version: '2.4'
services:
# run 3 agents, TeamCity setup allows it
teamcity-agent-1:
restart: always
build:
context: ./agent
dockerfile: ./Dockerfile
volumes:
- ./data/teamcity-agent-1/conf:/data/teamcity_agent/conf
environment:
AGENT_NAME: teamcity-agent-1
SERVER_URL: http://teamcity-server:8111/
DOCKER_IN_DOCKER: start
privileged: true # for running Docker in Docker
cpus: 0.15
mem_limit: 900mb
teamcity-agent-2:
restart: always
build:
context: ./agent
dockerfile: ./Dockerfile
volumes:
- ./data/teamcity-agent-2/conf:/data/teamcity_agent/conf
environment:
AGENT_NAME: teamcity-agent-2
SERVER_URL: http://teamcity-server:8111/
DOCKER_IN_DOCKER: start
privileged: true # for running Docker in Docker
cpus: 0.15
mem_limit: 900mb
teamcity-agent-3:
restart: always
build:
context: ./agent
dockerfile: ./Dockerfile
volumes:
- ./data/teamcity-agent-3/conf:/data/teamcity_agent/conf
environment:
AGENT_NAME: teamcity-agent-3
SERVER_URL: http://teamcity-server:8111/
DOCKER_IN_DOCKER: start
privileged: true # for running Docker in Docker
cpus: 0.15
mem_limit: 900mb
# also run the server
teamcity-server:
restart: always
image: jetbrains/teamcity-server
volumes:
- ./data/teamcity-server/data:/data/teamcity_server/datadir
- ./data/teamcity-server/logs:/opt/teamcity/logs
ports:
- 80:8111
privileged: true
cpus: 0.4
mem_limit: 1gb
# and for some of the modules, postgresql is required
postgres:
restart: always
image: postgres:10
volumes:
- ./data/postgres:/var/lib/postgresql/data
expose:
- 5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
cpus: 0.1
mem_limit: 200mb
networks:
default:
external:
name: teamcity