-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from fablabbcn/country-aliases
Add region aliases
- Loading branch information
Showing
9 changed files
with
131 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
FROM ruby:2.7.6 | ||
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs postgresql-client | ||
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client software-properties-common | ||
|
||
RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - | ||
|
||
RUN add-apt-repository "deb https://deb.nodesource.com/node_14.x $(lsb_release -sc) main" | ||
|
||
RUN apt-get update -qq && apt-get install -y nodejs | ||
|
||
RUN npm install -g yarn | ||
|
||
RUN mkdir /app | ||
|
||
WORKDIR /app | ||
copy .ruby-version /app/.ruby-version | ||
|
||
COPY .ruby-version /app/.ruby-version | ||
COPY Gemfile /app/Gemfile | ||
COPY Gemfile.lock /app/Gemfile.lock | ||
|
||
RUN bundle install | ||
|
||
CMD ["rails", "server", "-b", "0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class RegionAlias < ApplicationRecord | ||
belongs_to :region | ||
validates :alias, presence: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class CreateRegionAliases < ActiveRecord::Migration[7.0] | ||
def change | ||
create_table :region_aliases do |t| | ||
t.integer :region_id | ||
t.text :alias | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters