Files
sure/.devcontainer/docker-compose.yml
Pedro J. Aramburu 616c363b3e Enable selenium service in devcontainer for system tests (#1340)
Co-authored-by: Pedro J. Aramburu <pedro@joakin.dev>
2026-04-06 14:15:57 +02:00

76 lines
1.4 KiB
YAML

x-db-env: &db_env
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
x-rails-env: &rails_env
DB_HOST: db
HOST: "0.0.0.0"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BUNDLE_PATH: /bundle
REDIS_URL: redis://redis:6379/1
SELENIUM_REMOTE_URL: http://selenium:4444
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ./.bashrc:/root/.bashrc:ro,cached
- ..:/workspace:cached
- bundle_cache:/bundle
ports:
- ${PORT:-3000}:3000
command: sleep infinity
environment:
<<: *rails_env
depends_on:
- db
- redis
- selenium
worker:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bundle_cache:/bundle
command: bundle exec sidekiq
restart: unless-stopped
environment:
<<: *rails_env
depends_on:
- redis
redis:
image: redis:latest
volumes:
- redis-data:/data
restart: unless-stopped
db:
image: postgres:16
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
<<: *db_env
selenium:
image: selenium/standalone-chromium:latest
ports:
- "4444:4444"
- "7900:7900"
shm_size: 2gb
restart: unless-stopped
volumes:
postgres-data:
redis-data:
bundle_cache: