-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
59 lines (54 loc) · 2.49 KB
/
docker-compose.yml
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
# Example docker-compose file to run the Transition app in one container and a
# second one for PostGis
#
# Use the official postgis image for the DB, with the default username and
# password The DB data live in a docker volume. You can adapt to have it live in
# a specific location To run with an existing DB, change the
# PG_CONNECTION_STRING_PREFIX and drop the postgres service and related volume
#
# It uses the application configuration that was in the .env file that was built
# in the application image. It expects the project runtime directory to be in
# /app/examples/runtime.
# It used "testtransition" as the application image, you can adapt to your prefered image name.
#
# See the lines marked CUSTOM to see how to customize the image with frequent customization needs
version: "3.7"
# docker-compose version 1.22 is required for this version
services:
transition-www:
image: testtransition
ports:
- 8080:8080
environment:
PG_CONNECTION_STRING_PREFIX: postgres://postgres:pass@postgres:5432/
# CUSTOM Add environment variables. This can be any variable contained in the .env file. These have precedence over their value in .env
# PROJECT_CONFIG: /config/config.js
# TRANSITION_DOTENV: /path/to/custom/.env
depends_on:
- postgres
#HACK, needed for running trRouting. See https://github.com/kaligrafy/trRouting/issues/23
tty: true
volumes:
# Fine-tune these paths to the target container's runtime directories. It should match what is in the `projectDirectory` in the `config.js` file
- transition-project-import:/app/examples/runtime/imports
- transition-project-osrm:/app/examples/runtime/osrm
# TODO Remove this once the cache is actually a cache
- transition-project-cache:/app/examples/runtime/cache
# CUSTOM For custom project with config file and runtime directory, add
# additional volumes here. The following lines adds the local
# `/home/myHome/transition-example` in the container's `/config` directory
# - "/home/myHome/transition-example/:/config"
postgres:
image: postgis/postgis
volumes:
- transition-postgis-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: pass
volumes:
transition-postgis-data:
# Holding osrm import data in docker volumes. You can change them to be mount bind
# to use a specific location of your local filesystem
transition-project-import:
transition-project-osrm:
# Caching is actually data storage
transition-project-cache: