Commit 17b734ff authored by John Noel's avatar John Noel

Initial commit

parents
.git
.dockerignore
.byebug_history
log/*
tmp/*
\ No newline at end of file
# Prefix for docker images, containers, volumes and networks
COMPOSE_PROJECT_NAME=my_dockerized_app
# What Rails environment are we in?
RAILS_ENV=development
# More details about these Puma variables can be found in config/puma.rb.
# Which address should the Puma app server bind to?
BIND_ON=0.0.0.0:3000
# Puma supports multiple threads but in development mode you'll want to use 1
# thread to ensure that you can properly debug your application.
RAILS_MAX_THREADS=1
# Puma supports multiple workers but you should stick to 1 worker in dev mode.
WEB_CONCURRENCY=1
# Required by the Postgres Docker image. This sets up the initial database when
# you first run it.
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
# The database name will automatically get the Rails environment appended to it
DATABASE_NAME=app
# The full Redis URL for the Redis cache.
REDIS_CACHE_URL=redis://:yourpassword@redis:6379/0
# The namespace used by the Redis cache.
REDIS_CACHE_NAMESPACE=cache
# Action mailer (e-mail) settings.
# You will need to enable less secure apps in your Google account if you plan
# to use GMail as your e-mail SMTP server.
# You can do that here: https://www.google.com/settings/security/lesssecureapps
SMTP_ADDRESS=smtp.gmail.com
SMTP_PORT=587
SMTP_DOMAIN=gmail.com
SMTP_USERNAME=you@gmail.com
SMTP_PASSWORD=yourpassword
SMTP_AUTH=plain
SMTP_ENABLE_STARTTLS_AUTO=true
# Not running Docker natively? Replace 'localhost' with your Docker Machine IP
# address, such as: 192.168.99.100:3000
ACTION_MAILER_HOST=localhost:3000
ACTION_MAILER_DEFAULT_FROM=you@gmail.com
ACTION_MAILER_DEFAULT_TO=you@gmail.com
# The full Redis URL for Active Job.
ACTIVE_JOB_URL=redis://:yourpassword@redis:6379/0
# The queue prefix for all Active Jobs. The Rails environment will
# automatically be added to this value.
ACTIVE_JOB_QUEUE_PREFIX=orats_base:jobs
# The full Redis URL for Action Cable's back-end.
ACTION_CABLE_BACKEND_URL=redis://:yourpassword@redis:6379/0
# The full WebSocket URL for Action Cable's front-end.
# Not running Docker natively? Replace 'localhost' with your Docker Machine IP
# address, such as: ws://192.168.99.100:28080
ACTION_CABLE_FRONTEND_URL=ws://localhost:28080
# Comma separated list of RegExp origins to allow connections from.
# These values will be converted into a proper RegExp, so omit the / /.
#
# Examples:
# http:\/\/localhost*
# http:\/\/example.*,https:\/\/example.*
#
# Not running Docker natively? Replace 'localhost' with your Docker Machine IP
# address, such as: http:\/\/192.168.99.100*
ACTION_CABLE_ALLOWED_REQUEST_ORIGINS=http:\/\/localhost*
\ No newline at end of file
FROM ruby:2.5-alpine
RUN apk update && apk add build-base nodejs postgresql-dev
RUN apk add --update bash tzdata && rm -rf /var/cache/apk/*
RUN mkdir /app
WORKDIR /app
COPY . /app
\ No newline at end of file
source 'https://rubygems.org'
gem 'rails', '~> 5.2.0'
\ No newline at end of file
version: '3'
services:
db:
image: postgres:10.3-alpine
volumes:
- db:/var/lib/postgresql/data
env_file:
- .env
# redis:
# image: redis:4.0-alpine
# command: redis-server --requirepass yourpassword
# volumes:
# - redis:/data
web:
build: .
command: ./start
volumes:
- .:/app
- bundle:/usr/local/bundle
ports:
- '3000:3000'
depends_on:
- db
# - redis
env_file:
- .env
# sidekiq:
# depends_on:
# - db
# - redis
# build: .
# command: sidekiq -C config/sidekiq.yml.erb
# volumes:
# - .:/app
# env_file:
# - .env
# cable:
# depends_on:
# - redis
# build: .
# command: puma -p 28080 cable/config.ru
# ports:
# - 28080:28080
# volumes:
# - .:/app
# env_file:
# - .env
volumes:
db:
bundle:
redis:
\ No newline at end of file
#!/bin/bash
bundle check || bundle install --system -j4
rails s -b 0.0.0.0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment