Files
nairobi/docker-compose.yml
Javi Martín 4a1615accb Remove version attribute in docker-compose
Using a recent version of Docker Compose, we were getting a warning:

```
docker-compose.yml: the attribute `version` is obsolete, it will be
ignored, please remove it to avoid potential confusion
```

This attribute is obsolete since Docker Compose 1.27, released in 2020,
so most developers won't be affected by this change. Developers using
really old versions of Docker Compose might have to upgrade their Docker
Compose.
2024-09-18 15:59:39 +02:00

42 lines
1.1 KiB
YAML

services:
# service configuration for our database
database:
# use the preferred version of the official Postgres image
# see https://hub.docker.com/_/postgres/
image: postgres:13.16
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
# persist the database between containers by storing it in a volume
volumes:
- db_data:/var/lib/postgresql/data
# service configuration for our dockerized Rails app
app:
# use the Dockerfile next to this file
build: .
# rely on the RAILS_ENV value of the host machine
# environment:
#RAILS_ENV: $RAILS_ENV
# makes the app container aware of the DB container
depends_on:
- database
# expose the port we configured Unicorn to bind to
ports:
- "3000:3000"
# map our application source code, in full, to the application root of our container
volumes:
- .:/var/www/consul
- bundle:/usr/local/bundle
- node_modules:/var/www/consul/node_modules
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
volumes:
db_data: {}
bundle: {}
node_modules: {}