kitsune/docker-compose.yml

143 строки
3.0 KiB
YAML

version: '3.4'
services:
web:
image: itsre/sumo-kitsune:base-dev-${GIT_COMMIT_SHORT:-latest}
command: ./bin/run-dev.sh
env_file: .env
volumes:
- ./:/app:delegated
user: ${UID:-kitsune}
stdin_open: true
tty: true
depends_on:
- mariadb
- elasticsearch
- redis
ports:
- "8000:8000"
test:
image: itsre/sumo-kitsune:base-dev-${GIT_COMMIT_SHORT:-latest}
command: ./bin/run-unit-tests.sh
env_file: .env-test
volumes:
- ./:/app:delegated
user: ${UID:-kitsune}
depends_on:
- mariadb
- elasticsearch
- redis
test-js:
image: itsre/sumo-kitsune:staticfiles-${GIT_COMMIT_SHORT:-latest}
command: ./bin/run-mocha-tests.sh
env_file: .env-test
volumes:
- ./:/app:delegated
user: ${UID:-kitsune}
test-image:
image: itsre/sumo-kitsune:full-no-locales-${GIT_COMMIT_SHORT:-latest}
command: ./bin/run-unit-tests.sh
env_file: .env-test
depends_on:
- mariadb
- elasticsearch
- redis
test-image-js:
image: itsre/sumo-kitsune:staticfiles-${GIT_COMMIT_SHORT:-latest}
command: ./bin/run-mocha-tests.sh
env_file: .env-test
lint-l10n:
image: itsre/sumo-kitsune:base-${GIT_COMMIT_SHORT:-latest}
command: dennis-cmd lint --errorsonly locale
env_file: .env-test
volumes:
- ./locale:/app/locale:delegated
# images
base:
build:
context: .
target: base
args:
- GIT_SHA
image: itsre/sumo-kitsune:base-${GIT_COMMIT_SHORT:-latest}
base-dev:
build:
context: .
target: base-dev
args:
- GIT_SHA
image: itsre/sumo-kitsune:base-dev-${GIT_COMMIT_SHORT:-latest}
node-dev:
build:
context: .
target: frontend-base
args:
- GIT_SHA
image: itsre/sumo-kitsune:node-dev-${GIT_COMMIT_SHORT:-latest}
staticfiles:
build:
context: .
target: staticfiles
args:
- GIT_SHA
image: itsre/sumo-kitsune:staticfiles-${GIT_COMMIT_SHORT:-latest}
locales:
build:
context: .
target: locales
args:
- GIT_SHA
- LOCALE_ENV
image: itsre/sumo-kitsune:locales-${GIT_COMMIT_SHORT:-latest}
full-no-locales:
build:
context: .
target: full-no-locales
args:
- GIT_SHA
- LOCALE_ENV
image: itsre/sumo-kitsune:full-no-locales-${GIT_COMMIT_SHORT:-latest}
full:
build:
context: .
target: full
args:
- GIT_SHA
- LOCALE_ENV
image: itsre/sumo-kitsune:full-${GIT_COMMIT_SHORT:-latest}
# EXTERNAL SERVICES
mariadb:
image: mariadb:10.0
environment:
- MYSQL_ROOT_PASSWORD=kitsune
- MYSQL_USER=kitsune
- MYSQL_PASSWORD=kitsune
- MYSQL_DATABASE=kitsune
entrypoint:
- docker-entrypoint.sh
- --character-set-server=utf8
- --collation-server=utf8_unicode_ci
volumes:
- mysqlvolume:/var/lib/mysql
elasticsearch:
image: elasticsearch:2.4
redis:
image: redis:3
volumes:
mysqlvolume: