-
Notifications
You must be signed in to change notification settings - Fork 6
/
Kaiserfile
39 lines (32 loc) · 1.21 KB
/
Kaiserfile
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
require 'fileutils'
plugin :database
File.write('.kaiser.dockerfile', File.read('Dockerfile').sub('RUN bundle config set without \'development test\'', '') + "\nRUN rm /app/bin/spring")
dockerfile '.kaiser.dockerfile'
FileUtils.rm '.kaiser.dockerfile'
def_db postgres: { version: 'alpine', root_password: 'example' }
vault_app_name = ENV['VAULT_APP_NAME'] || 'vault'
vault_host = ENV['VAULT_HOST'] || "http://vault-app"
vault_port = ENV['VAULT_PORT'] || '8211'
app_params "
--platform linux/amd64
-e RAILS_ENV=development
-e DATABASE_URL=postgres://postgres:example@<%= db_container_name %>:5432
-e ENCRYPTION_KEY=abcdefghijklmn
-e GITHUB_ORGANIZATION='degica'
-e GITHUB_DEVELOPER_TEAM=''
-e GITHUB_ADMIN_TEAM='developers'
-e VAULT_URL=#{vault_host}:#{vault_port}
-e VAULT_PATH_PREFIX=degica
"
attach_mount '.rspec', '/app/.rspec'
attach_mount 'bin', '/app/bin'
attach_mount 'app', '/app/app'
attach_mount 'config', '/app/config'
attach_mount 'db', '/app/db'
attach_mount 'dockerfiles', '/app/dockerfiles'
attach_mount 'lib', '/app/lib'
attach_mount 'spec', '/app/spec'
attach_mount 'Gemfile', '/app/Gemfile'
attach_mount 'Gemfile.lock', '/app/Gemfile.lock'
expose '3000'
db_reset_command 'sh -c "rails db:setup"'