File tree Expand file tree Collapse file tree 5 files changed +63
-12
lines changed Expand file tree Collapse file tree 5 files changed +63
-12
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,10 @@ SECRET_KEY_BASE=
4
4
SENDGRID_USERNAME =
5
5
SENDGRID_PASSWORD =
6
6
DEVISE_SECRET_KEY =
7
- DEVISE_MAILER_SENDER = [email protected]
7
+ DEVISE_MAILER_SENDER = [email protected]
8
+
9
+ ALL_DATABASE_HOST = postgres
10
+ ALL_DATABASE_NAME = adventurers_league_log_development
11
+ ALL_DATABASE_PASSWORD = postgres
12
+ ALL_DATABASE_PORT = 5432
13
+ ALL_DATABASE_USERNAME = postgres
Original file line number Diff line number Diff line change 4
4
# or operating system, you probably want to add a global ignore instead:
5
5
# git config --global core.excludesfile '~/.gitignore_global'
6
6
7
+ # Ignore macOS files
8
+ .DS_Store
9
+
7
10
# Ignore bundler config.
8
11
/.bundle
9
12
10
13
# Ignore the default SQLite database.
11
14
/db /* .sqlite3
12
15
/db /* .sqlite3-journal
13
16
17
+ # Ignore files from database container
18
+ /tmp /db
19
+
14
20
# Ignore all logfiles and tempfiles.
15
21
/log /* .log
16
22
/tmp
Original file line number Diff line number Diff line change
1
+ FROM ruby:2.3.1
2
+
3
+ RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
4
+
5
+ WORKDIR /app
6
+
7
+ ADD Gemfile Gemfile.lock Rakefile ./
8
+
9
+ RUN bundle install
10
+
11
+ COPY . /app
Original file line number Diff line number Diff line change
1
+ development : &default
2
+ adapter : postgresql
3
+ pool : 5
4
+ timeout : 5000
5
+
6
+
7
+
8
+
9
+
1
10
# SQLite version 3.x
2
11
# gem install sqlite3
3
12
#
4
13
# Ensure the SQLite 3 gem is defined in your Gemfile
5
14
# gem 'sqlite3'
6
15
development :
7
- adapter : postgresql
16
+ << : *default
8
17
database : adventurers_league_log_development
9
- pool : 5
10
- timeout : 5000
18
+
11
19
12
20
# Warning: The database defined as "test" will be erased and
13
21
# re-generated from your development database when you run "rake".
14
22
# Do not set this db to the same as development or production.
15
23
test :
16
- adapter : postgresql
17
- database : adventurers_league_log_test
18
- pool : 5
19
- timeout : 5000
24
+ << : *default
25
+ database : adventurers_league_log_test
20
26
21
27
production :
22
- adapter : postgresql
23
- database : adventurers_league_log_production
24
- pool : 5
25
- timeout : 5000
28
+ << : *default
29
+ database : adventurers_league_log_production
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+ app :
5
+ build : .
6
+ command : rails s -b '0.0.0.0'
7
+ environment :
8
+ - DATABASE_URL=postgres://${ALL_DATABASE_USERNAME}:${ALL_DATABASE_PASSWORD}@${ALL_DATABASE_HOST}:${ALL_DATABASE_PORT}/${ALL_DATABASE_NAME}
9
+ ports :
10
+ - 3000:3000
11
+ volumes :
12
+ - .:/app
13
+ working_dir : /app
14
+
15
+ postgres :
16
+ image : postgres:alpine
17
+ environment :
18
+ - POSTGRES_HOST=postgres
19
+ - POSTGRES_PASSWORD=${ALL_DATABASE_PASSWORD}
20
+ - POSTGRES_USER=${ALL_DATABASE_USERNAME}
21
+ ports :
22
+ - 5432:5432
23
+ volumes :
24
+ - ./tmp/db:/var/lib/postgresql/data
You can’t perform that action at this time.
0 commit comments