-
Notifications
You must be signed in to change notification settings - Fork 1
/
oskari-create.json
58 lines (58 loc) · 1.74 KB
/
oskari-create.json
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
{
"variables": {
"base_image": "ubuntu:latest",
"oskari_image": "okffi/oskari"
},
"builders": [
{
"type": "docker",
"image": "{{user `base_image`}}",
"export_path": "/tmp/oskari-docker.tar"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get update",
"sudo apt-get install -y git",
"sudo apt-get install -y postgresql",
"sudo apt-get install -y postgis*",
"sudo apt-get install -y maven",
"sudo apt-get install -y openjdk-7-jdk",
"sudo /etc/init.d/postgresql start",
"sudo -u postgres createdb oskaridb",
"sudo -u postgres psql -d oskaridb -a -c 'CREATE EXTENSION postgis;'",
"sudo -u postgres psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"",
"sudo mkdir /oskari",
"cd /oskari",
"sudo git clone https://github.com/nls-oskari/oskari.git",
"sudo mv oskari Oskari",
"sudo git clone https://github.com/nls-oskari/oskari-server.git",
"cd /oskari/oskari-server",
"sudo mvn clean install"
]
},
{
"type": "file",
"source": "run.sh",
"destination": "/oskari/run.sh"
},
{
"type": "shell",
"inline": [
"sudo chmod 755 /oskari/run.sh"
]
},
],
"post-processors": [
[
{
"type": "docker-import",
"repository": "{{user `oskari_image`}}",
"tag": "latest"
}
]
]
}