]> git.openstreetmap.org Git - rails.git/blob - docker-compose.yml
Merge remote-tracking branch 'upstream/pull/3082'
[rails.git] / docker-compose.yml
1 version: "3"
2
3 services:
4   web:
5     build:
6       context: .
7     volumes:
8       - .:/app
9       # Prevent these directories from mounting so they're not shared between host OS and Docker
10       - /app/node_modules/
11       - /app/tmp/
12       # Mount these upload directories so they persist between runs
13       - web-traces:/home/osm/traces
14       - web-images:/home/osm/images
15     ports:
16       - "3000:3000"
17     environment:
18       # https://github.com/Shopify/bootsnap/issues/262
19       ENABLE_BOOTSNAP: 'false'
20     command: bundle exec rails s -p 3000 -b '0.0.0.0'
21     depends_on:
22       - db
23
24   db:
25     build:
26       context: .
27       dockerfile: docker/postgres/Dockerfile
28     ports:
29       - "54321:5432"
30     environment:
31       POSTGRES_HOST_AUTH_METHOD: trust
32       POSTGRES_DB: openstreetmap
33     volumes:
34       # Mount the Postgres data directory so it persists between runs
35       - db-data:/var/lib/postgresql/data
36
37 volumes:
38   web-traces:
39   web-images:
40   db-data: