Ability to run tests in docker

docker-compose -f test/docker-compose.yml run --rm web
ex-upload
Marcin Kulik 7 years ago
parent cf786d7de5
commit 66ac200733

@ -12,6 +12,7 @@ config :logger, level: :warn
# Configure your database
config :asciinema, Asciinema.Repo,
adapter: Ecto.Adapters.Postgres,
url: System.get_env("DATABASE_URL"),
username: "postgres",
password: "postgres",
database: "asciinema_test",

@ -0,0 +1,4 @@
RAILS_ENV=test
MIX_ENV=test
BASE_URL=http://localhost:3000
BUNDLE_PATH=/bundle

@ -0,0 +1,29 @@
version: '3'
volumes:
deps:
bundle:
node_modules:
build:
services:
postgres:
image: postgres
redis:
image: redis
web:
build: .
image: asciinema/asciinema.org
command: mix test
links:
- redis
- postgres
env_file: .env
volumes:
- deps:/app/deps:cached
- bundle:/bundle:cached
- node_modules:/app/node_modules:cached
- build:/app/_build:cached
- ../:/app:cached
Loading…
Cancel
Save