]> git.openstreetmap.org Git - rails.git/blob - docker-compose.yml
Bump coverallsapp/github-action from 2.1.0 to 2.1.2
[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       # Mount a tmp directory that will persist between runs
12       - web-tmp:/app/tmp
13       # Mount a storage directory that will persist between runs
14       - web-storage:/app/storage
15     ports:
16       - "3000:3000"
17     command: bundle exec rails s -p 3000 -b '0.0.0.0'
18     depends_on:
19       - db
20
21   db:
22     build:
23       context: .
24       dockerfile: docker/postgres/Dockerfile
25     ports:
26       - "54321:5432"
27     environment:
28       POSTGRES_HOST_AUTH_METHOD: trust
29       POSTGRES_DB: openstreetmap
30     volumes:
31       # Mount the Postgres data directory so it persists between runs
32       - db-data:/var/lib/postgresql/data
33
34 volumes:
35   web-tmp:
36   web-storage:
37   db-data: