Skip to content
Permalink
Browse files

Add docker-compose

  • Loading branch information...
ktmouk committed Mar 31, 2019
1 parent e1ce31f commit b576db0f9d92ae5839ea4b5edf6de3719b3c45e1
Showing with 78 additions and 0 deletions.
  1. +29 −0 .env.api.sample
  2. +5 −0 .env.web.sample
  3. +6 −0 .gitignore
  4. +38 −0 docker-compose.yml
@@ -0,0 +1,29 @@
# DB
# DB_HOST=db
# DB_PORT=5432
# DB_USER=postgres
# DB_PASS=

# Redis
# REDIS_URL=redis://redis:6379/0

# Sidekiq
# SIDEKIQ_USERNAME=
# SIDEKIQ_PASSWORD=

# Rails
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=true
SECRET_KEY_BASE=
JWT_SECRET=

# Hackaru
HACKARU_WEB_URL=http://localhost:3333

# SMTP
# SMTP_DEFAULT_URL_HOST=localhost:3000
# SMTP_FROM=no-reply@example.com

# AWS SES
# AWS_SES_ACCESS_KEY_ID=
# AWS_SES_SECRET_ACCESS_KEY=
@@ -0,0 +1,5 @@
# Hackaru
HACKARU_API_URL=http://localhost:3000

# Google Analytics
# GOOGLE_ANALYTICS_TRACKING_ID=
@@ -0,0 +1,6 @@
# Dotenv
/.env*
!.env.*.sample

# MacOS
.DS_Store
@@ -0,0 +1,38 @@
version: '3'
services:
db:
image: postgres:10.3
ports:
- 5432:5432

redis:
image: redis:4.0
ports:
- 6379:6379

sidekiq:
image: ktmouk/hackaru-api:0.1.0
env_file: .env.api
command: bundle exec sidekiq
-q hackaru-api_production_default
-q hackaru-api_production_mailers
links:
- db
- redis

api:
build: .
image: ktmouk/hackaru-api:0.1.0
env_file: .env.api
command: /bin/sh -c 'rm -f tmp/pids/server.pid && rails s -b 0.0.0.0'
ports:
- 3000:3000
links:
- db
- redis

web:
image: ktmouk/hackaru-web:0.1.0
env_file: .env.web
ports:
- 3333:3333

0 comments on commit b576db0

Please sign in to comment.
You can’t perform that action at this time.