forked from FennyLiang/cargocms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
151 lines (126 loc) · 2.97 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '2'
services:
build:
container_name: sailsSample_build
image: agileworks/sails_sample_env
command: "npm run build"
working_dir: /app
volumes:
- ./:/app
buildDev:
container_name: sailsSample_buildDev
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm i && npm run build'"
working_dir: /app
volumes:
- ./:/app
buildProd:
container_name: sailsSample_buildProd
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm i && npm run prod'"
working_dir: /app
volumes:
- ./:/app
test:
container_name: sailsSample_test
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm run test-junit'"
working_dir: /app
volumes:
- ./:/app
start-e2e-env:
container_name: e2e-env
image: selenium/standalone-firefox-debug:2.53.1
ports:
- "4444:4444"
- "5900:5900"
start:
container_name: sailsSample_dev
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm start'"
environment:
PORT: "1337"
NODE_ENV: "development"
DOMAIN_HOST: "localhost:1337"
ports:
- "8800:1337"
working_dir: /app
volumes:
- ./:/app
prod:
container_name: sailsSample_prod
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm run build-prod && npm run start-prod'"
environment:
PORT: "1337"
NODE_ENV: "development"
DOMAIN_HOST: "localhost:1337"
ports:
- "1337:1337"
working_dir: /app
volumes:
- ./:/app
dev:
container_name: sailsSample_dev
image: agileworks/sails_sample_env
command: "/bin/sh -l -c 'npm i && npm start'"
environment:
PORT: "1337"
NODE_ENV: "development"
DOMAIN_HOST: "localhost:1337"
ports:
- "8000:1337"
working_dir: /sailsSample
volumes:
- ./:/sailsSample
depends_on:
- "mysql"
networks:
- front-tier
- back-tier
mysql:
container_name: mysql
image: dgraziotin/mysql
expose:
- "3306"
environment:
MYSQL_ADMIN_PASS: "root"
MYSQL_USER_NAME: "nodejsSample"
MYSQL_USER_DB: "nodejsSample"
MYSQL_USER_PASS: "nodejsSample"
CREATE_MYSQL_BASIC_USER_AND_DB: "true"
volumes:
- mysql-data:/var/lib/mysql/
networks:
- back-tier
backup:
image: ubuntu
volumes:
- ./:/backup
- mysql-data:/dbdata
command: "tar cvf /backup/backup.tar /dbdata"
restore:
image: ubuntu
volumes:
- ./:/backup
- mysql-data:/dbdata
working_dir: /dbdata
command: "tar xvf /backup/backup.tar --strip 1"
ci:
container_name: ci
image: killercentury/jenkins-dind
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./.jenkins:/var/lib/jenkins
ports:
- "5000:5000"
- "8080:8080"
privileged: true
volumes:
mysql-data:
driver: local
networks:
front-tier:
driver: bridge
back-tier:
driver: bridge