rails/.devcontainer/compose.yaml
wonda-tea-coffee fb69560bea Delete obsolete version in compose.yaml
The following warning appeared when starting devcontainer.

```
WARN[0000] /home/***/ghq/github.com/rails/rails/.devcontainer/compose.yaml: `version` is obsolete
WARN[0000] /tmp/devcontainercli-***/docker-compose/docker-compose.devcontainer.build-1720224621191.yml: `version` is obsolete
```

In fact, the top-level version element will be obsolete in the compose specification.
https://github.com/compose-spec/compose-spec/blob/master/spec.md#version-top-level-element-obsolete
2024-07-06 09:29:11 +09:00

55 lines
1.1 KiB
YAML

services:
rails:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
depends_on:
- postgres
- mariadb
- redis
- memcached
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
postgres:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
mariadb:
image: mariadb:latest
restart: unless-stopped
volumes:
- mariadb-data:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: root
redis:
image: redis:latest
restart: unless-stopped
volumes:
- redis-data:/data
memcached:
image: memcached:latest
restart: unless-stopped
command: ["-m", "1024"]
volumes:
postgres-data:
mariadb-data:
redis-data: