]> git.openstreetmap.org Git - rails.git/blob - docker-compose.yml
Merge pull request #4887 from AntonKhorev/full-encode-wikipedia-value
[rails.git] / docker-compose.yml
1 version: "3"
2
3 services:
4   web:
5     build:
6       context: .
7     environment:
8       PIDFILE: /tmp/pids/server.pid
9     volumes:
10       - .:/app
11       # Prevent these directories from mounting so they're not shared between host OS and Docker
12       - /app/node_modules/
13       # Mount a tmp directory that will persist between runs
14       - web-tmp:/app/tmp
15       # Mount a storage directory that will persist between runs
16       - web-storage:/app/storage
17     tmpfs:
18       /tmp/pids/
19     ports:
20       - "3000:3000"
21     command: bundle exec rails s -p 3000 -b '0.0.0.0'
22     depends_on:
23       - db
24
25   db:
26     build:
27       context: .
28       dockerfile: docker/postgres/Dockerfile
29     ports:
30       - "54321:5432"
31     environment:
32       POSTGRES_HOST_AUTH_METHOD: trust
33       POSTGRES_DB: openstreetmap
34     volumes:
35       # Mount the Postgres data directory so it persists between runs
36       - db-data:/var/lib/postgresql/data
37
38 volumes:
39   web-tmp:
40   web-storage:
41   db-data: