forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CP] Dockerize Community Platform (aptos-labs#879)
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | ||
# | ||
# If you find yourself ignoring temporary files generated by your text editor | ||
# or operating system, you probably want to add a global ignore instead: | ||
# git config --global core.excludesfile '~/.gitignore_global' | ||
|
||
# Ignore bundler config. | ||
/.bundle | ||
|
||
# Ignore the default SQLite database. | ||
/db/*.sqlite3 | ||
/db/*.sqlite3-* | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
|
||
# Ignore pidfiles, but keep the directory. | ||
/tmp/pids/* | ||
!/tmp/pids/ | ||
!/tmp/pids/.keep | ||
|
||
# Ignore uploaded files in development. | ||
/storage/* | ||
!/storage/.keep | ||
/tmp/storage/* | ||
!/tmp/storage/ | ||
!/tmp/storage/.keep | ||
|
||
# Ignore asset builds. | ||
/app/assets/builds | ||
|
||
/public/assets | ||
|
||
# Ignore master key for decrypting credentials and more. | ||
/config/master.key | ||
/config/credentials.yml.enc | ||
|
||
# Never commit this dangerous file :-) | ||
.env |
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,34 @@ | ||
FROM ruby:3.1.2-slim | ||
|
||
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ | ||
build-essential \ | ||
gnupg2 \ | ||
less \ | ||
git \ | ||
libpq-dev \ | ||
postgresql-client \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN gem update --system && gem install bundler | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY Gemfile Gemfile.lock ./ | ||
|
||
ENV RAILS_ENV production | ||
ENV RAILS_SERVE_STATIC_FILES true | ||
ENV RAILS_LOG_TO_STDOUT true | ||
|
||
RUN bundle config --global frozen 1 | ||
RUN bundle config set --local without 'development test' | ||
RUN bundle install | ||
|
||
COPY . /usr/src/app | ||
|
||
# this is a fake secret key just to get it to compile the assets | ||
ENV SECRET_KEY_BASE=18ff7d41b9da02d394434e2eb140611516707334b7d7a7e15cf8b567061f30e9400a82e61aa772b9e6ccb72853932769d03bbbb9d78f62333c8f7adb95cc727d | ||
|
||
RUN bundle exec rake assets:precompile | ||
|
||
EXPOSE 3000 | ||
CMD ["bundle", "exec", "rails", "s", "-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