-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Dockerfile_deploy
121 lines (80 loc) · 2.44 KB
/
.Dockerfile_deploy
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
##########################
RASPBERRY DOCKER:
##########################
REMOVE ALL LINES:
:1,$d
# FROM resin/rpi-raspbian:jessie
FROM hypriot/rpi-node:latest
LABEL Name=koiosanalytics Version=0.1.0
COPY package.json /tmp/package.json
#RUN ls
RUN npm config set registry https://registry.npmjs.org/
RUN cd /tmp && npm i -g --unsafe-perm @angular/cli cordova ionic@beta typescript sleep-ms concurrently mkdirp && npm install --unsafe-perm
RUN mkdir -p /usr/src/app && mv /tmp/node_modules /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
#Launch server
EXPOSE 5443
CMD ["npm", "run", "dev"]
##########################
MODIFY GIT CONFIG:
##########################
vi $HOME/.gitconfig
[remote "origin"]
url = [email protected]:neolanders/koiosanalytics.git
pushURL = [email protected]:neolanders/koiosanalytics.git
pushURL = [email protected]:neolanders/koiosanalytics.git
pushURL = [email protected]:neolanders/koiosanalytics.git
###########################
CONFIGURE GITLAB RUNNERS:
###########################
DOC:
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/osx.md
Get Key Runner:
https://gitlab.com/neolanders/koios-analytics/settings/ci_cd
REGISTER RUNNER FIRST:
gitlab-runner register
sudo gitlab-ci-multi-runner register
gitlab-runner register --name koios-analytics --url http://gitlab.example.com --registration-token ed5715455a89e577ca0f6894a8c5aa
vi /Users/eric.alter/.gitlab-runner/config.toml
Projects:
https://gitlab.com (url)
hn_9B3QZo4mg3aQkPjY1 (token)
koiosanalytics (local)
docker
node:latest (image)
-----
koios-analytics
TO RUN:
gitlab-runner run
concurrent = 1
check_interval = 0
[[runners]]
name = "koiosanalytics"
url = "https://gitlab.com"
token = "bcc538f523481406f14264f0efd9d9"
executor = "docker"
[runners.docker]
tls_verify = false
image = "node:latest"
privileged = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
###########################
TO SOLVE ISSUES WITH RSA KEYS:
###########################
FIRST CHECK FOR ACCESS AUTH:
ssh -T [email protected]
1) cat $HOME/.ssh/id_rsa.pub
2) COPY PUBLIC KEY TO SERVER cat ~/.ssh/id_rsa.pub | pbcopy (copy to clipboard)
3) REMOVE CURRENT KEY FROM
sudo vi /var/root/.ssh/known_hosts
4) TRY RECONNECT WITH SSH (OR GIT PULL)
###########################
RESTART PROCESS CHROME (MAC)
###########################
killall -9 "Google Chrome".
git fetch -v origin
git merge origin