forked from jfrog/artifactory-docker-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
artifactory-ha.yml
82 lines (82 loc) · 2.61 KB
/
artifactory-ha.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
77
78
79
80
81
82
version: '2'
services:
postgresql:
image: docker.bintray.io/postgres:9.5.2
container_name: postgresql
ports:
- 5432:5432
environment:
- POSTGRES_DB=artifactory
# The following must match the DB_USER and DB_PASSWORD values passed to Artifactory
- POSTGRES_USER=artifactory
- POSTGRES_PASSWORD=password
volumes:
- /data/postgresql:/var/lib/postgresql/data
restart: always
artifactory-node1:
image: docker.bintray.io/jfrog/artifactory-pro:5.1.3
container_name: artifactory-node1
ports:
- 8081:8081
depends_on:
- postgresql
links:
- postgresql
volumes:
- /data/artifactory/node1:/var/opt/jfrog/artifactory
# Mount the postgresql driver. Make sure to have it in your local path (~/postgresql-9.4.1212.jar)
- ~/postgresql-9.4.1212.jar:/opt/jfrog/artifactory/tomcat/lib/postgresql-9.4.1212.jar
environment:
- HA_IS_PRIMARY=true
- HA_MEMBERSHIP_PORT=10017
- DB_TYPE=postgresql
# The following must match the POSTGRES_USER and POSTGRES_PASSWORD values passed to PostgreSQL
- DB_USER=artifactory
- DB_PASSWORD=password
# Add extra Java options by uncommenting the following line
#- EXTRA_JAVA_OPTIONS=-Xmx4g
restart: always
artifactory-node2:
image: docker.bintray.io/jfrog/artifactory-pro:5.1.3
container_name: artifactory-node2
ports:
- 8082:8081
depends_on:
- postgresql
- artifactory-node1
links:
- postgresql
# Must pass this to non primary so it can wait for primary to be up
- artifactory-node1
volumes:
- /data/artifactory/node2:/var/opt/jfrog/artifactory
# Mount the postgresql driver. Make sure to have it in your local path (~/postgresql-9.4.1212.jar)
- ~/postgresql-9.4.1212.jar:/opt/jfrog/artifactory/tomcat/lib/postgresql-9.4.1212.jar
environment:
- HA_IS_PRIMARY=false
- HA_MEMBERSHIP_PORT=10017
- DB_TYPE=postgresql
# The following must match the POSTGRES_USER and POSTGRES_PASSWORD values passed to PostgreSQL
- DB_USER=artifactory
- DB_PASSWORD=password
# Add extra Java options by uncommenting the following line
#- EXTRA_JAVA_OPTIONS=-Xmx4g
restart: always
nginx:
image: docker.bintray.io/jfrog/nginx-artifactory-pro:5.1.3
container_name: nginx
ports:
- 80:80
- 443:443
depends_on:
- artifactory-node1
- artifactory-node2
links:
- artifactory-node1
- artifactory-node2
volumes:
- /data/nginx:/var/opt/jfrog/nginx
environment:
- ART_BASE_URL=http://artifactory-node1:8081/artifactory
- SSL=true
restart: always