We are already using 15.8 in development as specified in `.tool_versions`. It's a good practice to keep the same version across all environments, including CI. By the way, production is using 15.10, so we might upgrade development to 15.10 as well. I’m not doing it now because I don’t want to break anyone’s local development environments.
39 lines
846 B
YAML
39 lines
846 B
YAML
services:
|
|
postgres:
|
|
image: postgres:15.8
|
|
container_name: ubicloud-postgres
|
|
env_file: .env
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
- ./init_db.sh:/docker-entrypoint-initdb.d/init_db.sh
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
db-migrator:
|
|
image: ubicloud/ubicloud:latest
|
|
container_name: ubicloud-db-migrator
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
env_file: .env
|
|
command: bundle exec rake dev_up
|
|
|
|
app:
|
|
image: ubicloud/ubicloud:latest
|
|
container_name: ubicloud-app
|
|
depends_on:
|
|
db-migrator:
|
|
condition: service_completed_successfully
|
|
env_file: .env
|
|
ports:
|
|
- 3000:3000
|
|
command: foreman start
|
|
|
|
volumes:
|
|
postgres:
|