-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (102 loc) · 2.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
108 lines (102 loc) · 2.5 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
version: '3'
services:
server:
image: jetbrains/teamcity-server:latest
networks:
- web
- default
volumes:
- "/opt/teamcity/data:/data/teamcity_server/datadir"
- "/opt/teamcity/logs:/opt/teamcity/logs"
hostname: ${VIRTUAL_HOST}
ports:
- "8111"
depends_on:
- postgres
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.backend=server"
- "traefik.frontend.rule=Host:${VIRTUAL_HOST}"
- "traefik.docker.network=web"
- "traefik.port=8111"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
agent:
build: ./agents/python-node-yarn
env_file: .env
depends_on:
- redis
# if you need docker inside the agent
# (http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/)
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
labels:
- "traefik.enable=false"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
postgres:
build: ./postgres
volumes:
- "/opt/teamcity/pg_data:/var/lib/postgresql/data"
- "/opt/teamcity/pg_backup:/backups"
env_file: .env
labels:
- "traefik.enable=false"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
redis:
image: redis:3.2
labels:
- "traefik.enable=false"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
traefik:
image: traefik:1.7-alpine
restart: on-failure
command:
- --logLevel=ERROR
- --docker
- --docker.watch=true
- --docker.exposedByDefault=false
- --docker.domain=${VIRTUAL_HOST}
- --defaultEntryPoints=http,https
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
- --entryPoints=Name:https Address::443 TLS
- --acme=true
- --acme.domains=${LETSENCRYPT_HOST}
- --acme.email=${LETSENCRYPT_EMAIL}
- --acme.storage=acme.json
- --acme.OnHostRule=false
- --acme.onDemand=false
- --acme.entryPoint=https
- --acme.httpChallenge
- --acme.httpChallenge.entryPoint=http
ports:
- "80:80"
- "443:443"
networks:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/traefik/acme.json:/acme.json
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
networks:
web:
external: true