-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-test.yml
71 lines (65 loc) · 1.6 KB
/
docker-compose-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '3.4'
# What is x-{app}? https://docs.docker.com/v17.09/compose/compose-file/#extension-fields
x-app: &app
build:
context: .
cache_from:
- ${DOCKER_USERNAME}/ohmuritel-base-environment:1.0.1
- ${DOCKER_USERNAME}/ohmuritel-rails-base:1.0.1
- ${DOCKER_USERNAME}/ohmuritel-rails-node:1.0.1
args:
RAILS_ENV: 'test'
GEMFILE_SHA: ${GEMFILE_SHA}
YARN_SHA: ${YARN_SHA}
environment: &env
NODE_ENV: test
RAILS_ENV: test
image: ${DOCKER_USERNAME}/ohmuritel-test:${SEMAPHORE_WORKFLOW_ID}
x-backend: &backend
<<: *app
stdin_open: true
tty: true
environment:
<<: *env
REDIS_URL: redis://redis:6379/
DATABASE_URL: postgres://postgres:postgres@postgres:5432
ELASTICSEARCH_URL: elasticsearch:9200
BOOTSNAP_CACHE_DIR: /bundle/bootsnap
WEBPACKER_DEV_SERVER_HOST: webpacker
WEB_CONCURRENCY: 1
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
depends_on:
- postgres
- redis
- elasticsearch
services:
rails:
<<: *backend
ports:
- '3000:3000'
postgres:
image: postgres:11.1-alpine
environment:
PSQL_HISTFILE: /root/log/.psql_history
ports:
- 5432
redis:
image: redis:3.2-alpine
ports:
- 6379
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
environment:
- discovery.type=single-node
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200
- 9300