-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (68 loc) · 2.43 KB
/
build.gradle
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
buildscript {
ext {
baseImage = "debian:stretch"
grailsVersion = ""
dockerFile=project.file("docker/Dockerfile")
// must be a closure. If set to =false then it thinks the proeprty does not exist
hasJar={false}
dockerStatementsOverride = {
[
"FROM debian:stretch",
"USER root",
"""RUN useradd --create-home -u 1001 -r -g 0 -s /sbin/nologin -c 'Default Application User' -d /home/omar omar && \\
apt-get -qq update && \\
DEBIAN_FRONTEND=noninteractive apt-get -y install apt-transport-https && \\
apt-get -y install curl && \\
apt-get -y install unzip && \\
apt-get -y install build-essential && \\
apt-get -y install python && \\
apt-get -y install libcairo2-dev && \\
apt-get -y install libgles2-mesa-dev && \\
apt-get -y install libgbm-dev && \\
apt-get -y install libllvm3.9 && \\
apt-get -y install libprotobuf-dev && \\
apt-get -y install libxxf86vm-dev && \\
apt-get -y install xvfb && \\
apt-get -y install lbnss-wrapper && \\
echo "deb https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodejs.list && \\
echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodejs.list && \\
apt-get -qq update && \\
DEBIAN_FRONTEND=noninteractive apt-get -y --allow-unauthenticated install nodejs && \\
rm /etc/apt/sources.list.d/nodejs.list && \\
apt-get clean""",
"COPY / /home/omar",
"""RUN chown -R 1001:0 /home/omar && chmod -R g+w /home/omar && chmod 777 /home/omar && \\
rm -rf /data && \\
cd /home/omar && \\
npm install --production && \\
npm install -g tileserver-gl""",
"WORKDIR /data",
"""ENV NODE_ENV="production" """,
"USER 1001",
"EXPOSE 8080",
"""ENTRYPOINT ["/home/omar/run.sh"] """
]
}
if(System.env.OMAR_COMMON_PROPERTIES)
{
apply from: System.env.OMAR_COMMON_PROPERTIES
}
}
repositories {
mavenLocal()
maven { url ossimMavenProxy }
}
dependencies {
classpath 'com.bmuschko:gradle-docker-plugin:3.0.6'
classpath 'com.github.skhatri:gradle-s3-plugin:1.0.4'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5"
}
}
plugins {
id "com.github.ben-manes.versions" version "0.17.0"
id "org.sonarqube" version "2.6.2"
}
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "maven-publish"
apply plugin: "maven"