forked from e621ng/e621ng
[Docker] Add test service
This can simply be invoced with `docker-compose run tests`.
This commit is contained in:
parent
a7f129100e
commit
5180d313ef
@ -1,25 +1,27 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
e621:
|
||||
build: ./
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
- public_packs:/app/public/packs
|
||||
- public_packs_test:/app/public/packs-test
|
||||
- post_data:/app/public/data
|
||||
environment:
|
||||
x-environment: &common-env
|
||||
DATABASE_URL: postgresql://danbooru:@postgres
|
||||
RAILS_ENV: development
|
||||
DANBOORU_HOSTNAME: http://localhost:3000
|
||||
DANBOORU_REDIS_URL: redis://redis
|
||||
DANBOORU_ELASTICSEARCH_HOST: elastic
|
||||
DANBOORU_MEMCACHED_SERVERS: memcached
|
||||
DANBOORU_IQDBS_SERVER: http://iqdb:4567
|
||||
# These are just development secrets, do not use them in production
|
||||
SECRET_TOKEN: 1c58518a891eff4520cadc59afa9e378a9325f1247544ff258096e497f095f45
|
||||
SESSION_SECRET_KEY: 44b4f44e9f253c406cbe727d403d500c1cecff943e4d2aea8f5447f28846fffe
|
||||
|
||||
services:
|
||||
e621:
|
||||
build: ./
|
||||
image: e621
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
- public_packs:/app/public/packs
|
||||
- post_data:/app/public/data
|
||||
environment:
|
||||
<<: *common-env
|
||||
RAILS_ENV: development
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
@ -28,13 +30,30 @@ services:
|
||||
- iqdb
|
||||
tty: true
|
||||
|
||||
tests:
|
||||
image: e621
|
||||
environment:
|
||||
<<: *common-env
|
||||
# Hide annoying output from libvips on corrupt files
|
||||
VIPS_WARNING: "0"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- memcached
|
||||
- elastic
|
||||
entrypoint: ["bundle", "exec", "rails", "test"]
|
||||
profiles:
|
||||
- test
|
||||
|
||||
nginx:
|
||||
image: nginx:stable-alpine
|
||||
volumes:
|
||||
- ./public:/app/public
|
||||
- post_data:/app/public/data
|
||||
- public_packs:/app/public/packs
|
||||
- public_packs_test:/app/public/packs-test
|
||||
- ./docker/default.conf.template:/etc/nginx/templates/default.conf.template
|
||||
environment:
|
||||
NGINX_HOST: localhost
|
||||
|
Loading…
Reference in New Issue
Block a user