-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (41 loc) · 1.69 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
teamcitydb:
image: postgres:9.3
ports:
- "5432:5432"
environment:
- POSTGRES_USER=teamcity
- POSTGRES_PASSWORD=teamcity
- POSTGRES_DB=teamcity
volumes_from:
- pgdata
pgdata:
image: cogniteev/echo
command: echo 'Data Container for PostgreSQL'
volumes:
- /var/lib/postgresql/data
teamcity:
image: sjoerdmulder/teamcity
ports:
- "8111:8111"
links:
- teamcitydb
environment:
- TEAMCITY_DATA_PATH=/var/lib/teamcity
- DB_HOSTNAME=db
- DB_DATABASE=teamcitydb
- DB_USERNAME=teamcitydb
- DB_PASSWORD=teamcitydb
volumes:
- ./volumes/teamcity:/var/lib/teamcity
#TODO add some agents
#TODO for initial startup & DB setup execute
#SETUP_TEAMCITY_SQL="create role teamcity with login password 'teamcity';create database teamcity owner teamcity;"
#docker run --name some-postgres -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -d postgres
# Create the database using psql
#docker run -it --link teamcity_teamcitydb_1:postgres --rm -e "SETUP_TEAMCITY_SQL=$SETUP_TEAMCITY_SQL" -e "PGPASSWORD=$POSTGRES_PASSWORD" postgres bash -c 'exec echo $SETUP_TEAMCITY_SQL |psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
#docker run --link some-postgres:postgres -v volumes/teamcity:/var/lib/teamcity -d sjoerdmulder/teamcity:latest
# Start an official docker postgres instance
#docker run --name some-postgres -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -d postgres
# Create the database using psql
#kdocker run -it --link some-postgres:postgres --rm -e
#command: "SETUP_TEAMCITY_SQL=$SETUP_TEAMCITY_SQL" -e "PGPASSWORD=" postgres bash -c 'exec echo $SETUP_TEAMCITY_SQL |psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'