Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ yarn-debug.log*
/coverage

.DS_Store
yarn.lock
.vscode

/environment/artifacts
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ RUN bundle exec rails assets:precompile
EXPOSE 3000
ENV RAILS_ENV="test" \
NODE_ENV="test" \
RAILS_SERVE_STATIC_FILES="true"
RAILS_SERVE_STATIC_FILES="true"
CMD ["/runner/runner.sh"]

# build and install all the things for the production env
FROM base_env as production
COPY ./environment/docker-run-production.sh /runner/runner.sh
COPY . .
RUN chmod +x /runner/runner.sh
RUN bundle exec rails assets:precompile
EXPOSE 3000

ENV RAILS_ENV="production" \
Expand Down
8 changes: 4 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ default: &default

development:
<<: *default
url: <%= ENV["DATABASE_URL"].gsub('?', '_development?') %>
url: <%= ENV.fetch("DATABASE_URL"){ "default" }.gsub('?', '_development?') %>

test:
<<: *default
url: <%= ENV["DATABASE_URL"].gsub('?', '_test?') %>
url: <%= ENV.fetch("DATABASE_URL"){ "default" }.gsub('?', '_test?') %>

staging:
<<: *default
url: <%= ENV["DATABASE_URL"].gsub('?', '_staging?') %>
url: <%= ENV.fetch("DATABASE_URL"){ "default" }.gsub('?', '_staging?') %>

production:
<<: *default
url: <%= ENV["DATABASE_URL"].gsub('?', '_production?') %>
url: <%= ENV.fetch("DATABASE_URL"){ "default" }.gsub('?', '_production?') %>
3 changes: 2 additions & 1 deletion environment/docker-run-development.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/ash
#!/usr/bin/env sh

cd /app
rm -f /app/tmp/pids/server.pid

#rails db:migrate RAILS_ENV=development
rails db:migrate
rails s -u puma -p 3000 -b=0.0.0.0

# TODO get debug version working
Expand Down
3 changes: 2 additions & 1 deletion environment/docker-run-production.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/ash
#!/usr/bin/env sh

cd /app
rm -f /app/tmp/pids/server.pid
rails db:migrate
rails s -u puma -p 3000 -b=0.0.0.0
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^3"
"webpack-dev-server": "^3",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.18.6"
}
}
7,414 changes: 7,414 additions & 0 deletions yarn.lock

Large diffs are not rendered by default.