-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
60 lines (54 loc) · 2.21 KB
/
docker-compose.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
---
# Our PostgreSQL service:
postgres:
image: postgres:9.4.4 # Heroku PostgreSQL Version
ports:
- "5432:5432" # Bind host port 5432 to PostgreSQL port 5432
volumes:
- .:/app
- ./db/postgres-init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
LC_ALL: C.UTF-8
POSTGRES_PASSWORD: 3x4mpl34pp
elasticsearch:
image: elasticsearch:1.7.1
ports:
- "9200:9200"
- "9300:9300"
# Application: -----------------------------------------------------------------
# We'll also use this configuration (&app_base) for the worker and test
# containers:
app: &app_base
image: vovimayhem/app-dev:mri-2.2.3 # A ruby image with DTrace enabled for dev
# Rails 4.2 now binds to 127.0.0.1 by default and not 0.0.0.0.
# Start the server using bin/rails server -b 0.0.0.0 and that should sort it.
# http://stackoverflow.com/questions/27799260/rails-4-2-server-port-forwarding-on-vagrant-does-not-work
# It's fine for development, do not do it in production:
command: rails server -p 3000 -b 0.0.0.0
ports:
- "3000:3000" # Bind host port 3000 to app HTTP port 3000
volumes:
- .:/app
##############################################################################
# With linked containers, Docker writes entries to the container's /etc/hosts.
# We'll try here naming the entries docker will insert into the
# container's /etc/hosts, so we can use more familiar URL's for our app - See
# this container's environment section below:
links: &app_links
- postgres:postgres.myapp.example.com
- elasticsearch:redis.myapp.example.com
environment: &app_environment
# PostgreSQL Database:
DATABASE_URL: postgres://postgres:[email protected]:5432/my_app_development?pool=25&encoding=unicode&schema_search_path=public
# Redis Database:
REDIS_URL: redis://redis.myapp.example.com:6379
# Sidekiq configuration:
SIDEKIQ_CONCURRENCY: 5
SIDEKIQ_TIMEOUT: 10
# Enable the byebug debugging server - this can be overriden
# from the command line:
ENABLE_DEBUG_SERVER: true
# Run the app in the 'development' environment:
RACK_ENV: development
RAILS_ENV: development
env_file: .env # Include the environment variables in the unversioned .env file