Sha256: 168c5d5a2a9f282edd314c1f27b00649872c684a20409feed048ed6e7c717fc0

Contents?: true

Size: 1.63 KB

Versions: 7

Compression:

Stored size: 1.63 KB

Contents

version: '3'

services:
  rails:
    build:
      context: .
      dockerfile: ./<%= "#{Constants::CONFIG_DIRECTORY_NAME}/rails/Dockerfile" %>
    expose:
      - '<%= application_port %>'
    ports:
      - '<%= "#{application_port}:#{application_port}" %>'
<% if DRConfig.linked_database? %>
<% if databases.values.include?('mysql') || databases.values.include?('postgresql') %>
    links:
      - '<%= databases[application_env] %>:<%= database_host_name %>'
    depends_on:
      - <%= databases[application_env] %>
<% end %>
<% end %>

<% if DRConfig.linked_database? %>
<% if databases.values.include?('mysql') || databases.values.include?('postgresql') %>
  <%= databases[application_env] %>:
    build:
      context: .
      dockerfile: ./<%= "#{Constants::CONFIG_DIRECTORY_NAME}/#{databases[application_env]}/Dockerfile" %>
    volumes:
      - './<%= "#{Constants::CONFIG_DIRECTORY_NAME}/#{databases[application_env]}/#{Constants::DATA_DIRECTORY_NAME}" %>:/var/lib/<%= databases[application_env] %>:rw'
    ports:
      <% if databases[application_env] == 'postgresql' %>
      - '5400:5432'
      <% elsif databases[application_env] == 'mysql' %>
      - '3300:3306'
      <% end %>
    environment:
      <% if databases[application_env] == 'postgresql' %>
      - POSTGRES_USER=<%= database_user_name %>
      - POSTGRES_PASSWORD=<%= database_user_pass %>
      <% elsif databases[application_env] == 'mysql' %>
      - MYSQL_ROOT_PASSWORD=<%= mysql_root_pass %>
        <% if database_user_name != 'root' %>
      - MYSQL_USER=<%= database_user_name %>
      - MYSQL_PASSWORD=<%= database_user_pass %>
        <% end %>
      <% end %>
<% end %>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dockerize_rails-1.0.4.beta.1 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.6 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.5 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.4 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.3 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.2 resources/docker-compose.yml.erb
dockerize_rails-1.0.3.beta.1 resources/docker-compose.yml.erb