You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/docker-compose.ci.yml

62 lines
1.4 KiB

services:
lint:
build:
context: .
dockerfile: Dockerfile.ci
command: sh -c "bundle exec rubocop && bundle exec erb_lint ./app && yarn eslint 'app/javascript/**/*.js'"
volumes:
- .:/app:ro
- bundle_cache:/usr/local/bundle
- node_cache:/app/node_modules
tmpfs:
- /tmp
brakeman:
build:
context: .
dockerfile: Dockerfile.ci
command: bundle exec brakeman -q --exit-on-warn
volumes:
- .:/app:ro
- bundle_cache:/usr/local/bundle
- node_cache:/app/node_modules
tmpfs:
- /tmp
rspec:
build:
context: .
dockerfile: Dockerfile.ci
command: sh -c "bundle exec rake db:create db:migrate && bundle exec rake assets:precompile && bundle exec rspec"
depends_on:
postgres:
condition: service_healthy
environment:
RAILS_ENV: test
NODE_ENV: test
DATABASE_URL: postgres://postgres:postgres@postgres:5432/docuseal_test
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
- node_cache:/app/node_modules
tmpfs:
- /tmp
postgres:
image: postgres:18
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: docuseal_test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
tmpfs:
- /var/lib/postgresql/data
volumes:
bundle_cache:
node_cache: