File tree 4 files changed +82
-0
lines changed
4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ .dockerignore
2
+ node_modules
3
+ npm-debug.log
4
+ Dockerfile
5
+ .git
6
+ .gitignore
7
+ utils
8
+ test
Original file line number Diff line number Diff line change
1
+ # Build Stage
2
+ FROM node:8.15 AS BUILD
3
+
4
+ WORKDIR /usr/src/app
5
+ # Copy content of git repo to container
6
+ COPY ./package.json /usr/src/app/
7
+ COPY ./package-lock.json /usr/src/app/
8
+
9
+ RUN npm install --only=production && npm prune --production
10
+
11
+ # Production Stage
12
+ FROM node:8.15-slim
13
+
14
+ # Copy tilemill and node modules to new container
15
+ WORKDIR /usr/src/app
16
+ COPY --chown=node:node --from=BUILD /usr/src/app/node_modules /usr/src/app/node_modules
17
+ COPY --chown=node:node . /usr/src/app
18
+
19
+ RUN chmod 777 startdocker.sh
20
+
21
+ USER node
22
+ # Export port for tiles
23
+ EXPOSE 20008
24
+ # Export port for webpage
25
+ EXPOSE 20009
26
+
27
+ CMD ["node" , "/usr/src/app/index.js" , "--listenHost=0.0.0.0" ]
28
+
Original file line number Diff line number Diff line change @@ -43,7 +43,20 @@ Scripts have been created that will do most everything for you. They were writte
43
43
44
44
[ Full Installation instructions can be found in the TileMill Documentation] ( https://tilemill-project.github.io/tilemill/docs/install/ ) .
45
45
46
+ ### Docker
47
+ It is also possible to run tilemill as a docker container:
46
48
49
+ git clone https://github.com/tilemill-project/tilemill.git
50
+ cd tilemill
51
+ docker-compose up
52
+
53
+ This will host a docker container which uses the port 20008 and 20009 for tilemill, tilemill is then reachable under [ http://localhost:20009 ] ( http://localhost:20009 ) .
54
+ Additionally, a postgis instance is started as well which is reachable under
55
+
56
+ host=localhost port=5432 user=docker password=docker dbname=gis
57
+
58
+ Docker hosted volumes are used for the containers, hence if you want to use sqlite dbs you have to interact with those to get the dbs into the docker container.
59
+
47
60
# Build Status, Running Tests, Updating Documentation
48
61
49
62
See CONTRIBUTING.md
Original file line number Diff line number Diff line change
1
+ version : " 3.3"
2
+ services :
3
+ postgis :
4
+ image : kartoza/postgis:9.6-2.4
5
+ volumes :
6
+ - postgisVolume:/var/lib/postgresql
7
+ environment :
8
+ - POSTGRES_USER=docker
9
+ - POSTGRES_PASS=docker
10
+ - ALLOW_IP_RANGE=0.0.0.0/0
11
+ ports :
12
+ - " 5432:5432"
13
+
14
+ tilemill :
15
+ build :
16
+ context : ./
17
+ ports :
18
+ - " 20008:20008"
19
+ - " 20009:20009"
20
+ volumes :
21
+ - tilemillVolume:/home/node/
22
+ environment :
23
+ - PGPORT=5432
24
+ - PGHOST=postgis
25
+ - PGDATABASE=gis
26
+ - PGUSER=docker
27
+ - PGPASSWORD=docker
28
+ depends_on :
29
+ - postgis
30
+
31
+ volumes :
32
+ postgisVolume :
33
+ tilemillVolume :
You can’t perform that action at this time.
0 commit comments