Skip to content

Commit e91c826

Browse files
committedNov 8, 2019
added gitlab-cli
1 parent a1a8708 commit e91c826

14 files changed

+195
-24
lines changed
 

‎.gitlab-ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
stages:
2+
- build-image
3+
4+
5+
build-image:
6+
stage: build-image
7+
image:
8+
name: docker/compose:1.21.2
9+
entrypoint: ["/bin/sh", "-c"]
10+
variables:
11+
DOCKER_HOST: tcp://docker:2375
12+
services:
13+
- docker:dind
14+
script:
15+
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
16+
- docker-compose -f docker-compose-ci.yml build
17+
- docker-compose -f docker-compose-ci.yml push
File renamed without changes.
File renamed without changes.

‎database/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mongo

‎docker-compose-ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: "3.1"
2+
3+
services: # Tüm Docker container'larımız 'services' altında olacak
4+
proxy:
5+
image: "${CI_REGISTRY_IMAGE-local}/proxy:1.0.2"
6+
build:
7+
context: ./nginx
8+
database: # Mongo server için tanımlama
9+
image: "${CI_REGISTRY_IMAGE-local}/database:1.0.2"
10+
build:
11+
context: ./database
12+
database-seed:
13+
image: "${CI_REGISTRY_IMAGE-local}/database-seed:1.0.2"
14+
build:
15+
context: ./database-seed
16+
rabbitmq: # Rabbit Mq server için tanımlama
17+
image: "${CI_REGISTRY_IMAGE-local}/rabbitmq:1.0.2"
18+
build:
19+
context: ./rabbitmq
20+
queue: # Queue server için tanımlama
21+
image: "${CI_REGISTRY_IMAGE-local}/queue:1.0.2"
22+
build:
23+
context: ./queue
24+
server: # İlk Express server için tanımlama
25+
image: "${CI_REGISTRY_IMAGE-local}/server:1.0.2"
26+
build:
27+
context: ./server
28+
client: # react client için tanımlama
29+
image: "${CI_REGISTRY_IMAGE-local}/client:1.0.2"
30+
build:
31+
context: ./client

‎docker-compose-old.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: "3.1"
2+
3+
services: # Tüm Docker container'larımız 'services' altında olacak
4+
proxy:
5+
build:
6+
context: ./nginx
7+
dockerfile: Dockerfile
8+
ports:
9+
- "3300:80"
10+
links:
11+
- first-server
12+
- second-server
13+
restart: always
14+
database: # Mongo server için tanımlama
15+
build:
16+
context: ./mongo
17+
dockerfile: Dockerfile
18+
ports: # port yönlendirmeleri
19+
- "9000:27017"
20+
restart: always
21+
database-seed:
22+
build:
23+
context: ./database-seed
24+
dockerfile: Dockerfile
25+
links:
26+
- database
27+
rabbitmq: # Rabbit Mq server için tanımlama
28+
build:
29+
context: ./rabbitmq
30+
dockerfile: Dockerfile
31+
ports: # port yönlendirmeleri
32+
- "9003:15672"
33+
restart: always
34+
queue: # Queue server için tanımlama
35+
build:
36+
context: ./queue
37+
dockerfile: Dockerfile
38+
ports: # port yönlendirmeleri
39+
- "5000:3000"
40+
links:
41+
- rabbitmq
42+
restart: always
43+
first-server: # İlk Express server için tanımlama
44+
build:
45+
context: ./server
46+
dockerfile: Dockerfile
47+
ports: # port yönlendirmeleri
48+
- "3500:3000"
49+
links:
50+
- database
51+
- queue
52+
restart: always
53+
second-server: # İkinci Express server için tanımlama
54+
build:
55+
context: ./server
56+
dockerfile: Dockerfile
57+
ports: # port yönlendirmeleri
58+
- "3400:3000"
59+
restart: always
60+
client: # react client için tanımlama
61+
build:
62+
context: ./client
63+
dockerfile: Dockerfile
64+
ports: # port yönlendirmeleri
65+
- "3600:3000"
66+
links:
67+
- proxy
68+
- queue
69+
restart: always

‎docker-compose-old2.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: "3.1"
2+
3+
services: # Tüm Docker container'larımız 'services' altında olacak
4+
proxy:
5+
image: "${CI_REGISTRY_IMAGE-local}/proxy:${CI_COMMIT_SHORT_SHA-local}"
6+
build:
7+
context: ./nginx
8+
ports:
9+
- "3300:80"
10+
links:
11+
- first-server
12+
- second-server
13+
restart: always
14+
database: # Mongo server için tanımlama
15+
image: "${CI_REGISTRY_IMAGE-local}/database:${CI_COMMIT_SHORT_SHA-local}"
16+
ports: # port yönlendirmeleri
17+
- "9000:27017"
18+
restart: always
19+
database-seed:
20+
image: "${CI_REGISTRY_IMAGE-local}/database-seed:${CI_COMMIT_SHORT_SHA-local}"
21+
build:
22+
context: ./database-seed
23+
links:
24+
- database
25+
rabbitmq: # Rabbit Mq server için tanımlama
26+
image: "${CI_REGISTRY_IMAGE-local}/rabbitmq:${CI_COMMIT_SHORT_SHA-local}"
27+
build:
28+
context: ./rabbitmq
29+
ports: # port yönlendirmeleri
30+
- "9003:15672"
31+
restart: always
32+
queue: # Queue server için tanımlama
33+
image: "${CI_REGISTRY_IMAGE-local}/queue:${CI_COMMIT_SHORT_SHA-local}"
34+
build:
35+
context: ./queue
36+
ports: # port yönlendirmeleri
37+
- "5000:3000"
38+
links:
39+
- rabbitmq
40+
restart: always
41+
first-server: # İlk Express server için tanımlama
42+
image: "${CI_REGISTRY_IMAGE-local}/first-server:${CI_COMMIT_SHORT_SHA-local}"
43+
build:
44+
context: ./server
45+
ports: # port yönlendirmeleri
46+
- "3500:3000"
47+
links:
48+
- database
49+
- queue
50+
restart: always
51+
second-server: # İkinci Express server için tanımlama
52+
image: "${CI_REGISTRY_IMAGE-local}/second-server:${CI_COMMIT_SHORT_SHA-local}"
53+
build:
54+
context: ./server
55+
ports: # port yönlendirmeleri
56+
- "3400:3000"
57+
restart: always
58+
client: # react client için tanımlama
59+
image: "${CI_REGISTRY_IMAGE-local}/client:${CI_COMMIT_SHORT_SHA-local}"
60+
build:
61+
context: ./client
62+
ports: # port yönlendirmeleri
63+
- "3600:3000"
64+
links:
65+
- proxy
66+
- queue
67+
restart: always

‎docker-compose.yml

+9-23
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,52 @@ version: "3.1"
22

33
services: # Tüm Docker container'larımız 'services' altında olacak
44
proxy:
5-
build:
6-
context: .
7-
dockerfile: nginx.Dockerfile
5+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/proxy:1.0.2
86
ports:
97
- "3300:80"
108
links:
119
- first-server
1210
- second-server
1311
restart: always
1412
database: # Mongo server için tanımlama
15-
image: mongo # imaj adı
13+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/database:1.0.2
1614
ports: # port yönlendirmeleri
1715
- "9000:27017"
1816
restart: always
1917
database-seed:
20-
build:
21-
context: ./database-seed
22-
dockerfile: mongo.Dockerfile
18+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/database-seed:1.0.2
2319
links:
2420
- database
2521
rabbitmq: # Rabbit Mq server için tanımlama
26-
build:
27-
context: .
28-
dockerfile: rabbitmq.Dockerfile
22+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/rabbitmq:1.0.2
2923
ports: # port yönlendirmeleri
3024
- "9003:15672"
3125
restart: always
3226
queue: # Queue server için tanımlama
33-
build:
34-
context: ./queue
35-
dockerfile: queue.Dockerfile
27+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/queue:1.0.2
3628
ports: # port yönlendirmeleri
3729
- "5000:3000"
3830
links:
3931
- rabbitmq
4032
restart: always
4133
first-server: # İlk Express server için tanımlama
42-
build:
43-
context: ./server
44-
dockerfile: server.Dockerfile
34+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/server:1.0.2
4535
ports: # port yönlendirmeleri
4636
- "3500:3000"
4737
links:
4838
- database
4939
- queue
5040
restart: always
5141
second-server: # İkinci Express server için tanımlama
52-
build:
53-
context: ./server
54-
dockerfile: server.Dockerfile
42+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/server:1.0.2
5543
ports: # port yönlendirmeleri
5644
- "3400:3000"
5745
restart: always
5846
client: # react client için tanımlama
59-
build:
60-
context: ./client
61-
dockerfile: client.Dockerfile
47+
image: registry.gitlab.com/ahmettugur/react-redux-nodejs-webapi/client:1.0.2
6248
ports: # port yönlendirmeleri
6349
- "3600:3000"
6450
links:
6551
- proxy
6652
- queue
67-
restart: always
53+
restart: always

‎nginx.Dockerfile ‎nginx/Dockerfile

File renamed without changes.

‎nginx.conf ‎nginx/nginx.conf

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎server/helper/db.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const mongoose = require("mongoose");
33
module.exports = () => {
44
mongoose.connect(
55
"mongodb://database/store",
6-
{ useNewUrlParser: true }
6+
{ useNewUrlParser: true ,useUnifiedTopology: true}
77
);
88

99
mongoose.connection.on("open", () => {

0 commit comments

Comments
 (0)
Please sign in to comment.