-
Notifications
You must be signed in to change notification settings - Fork 8
TASK-6 #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
one0fnine
wants to merge
2
commits into
spajic:master
Choose a base branch
from
one0fnine:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
TASK-6 #7
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,2 @@ | ||
| web: bundle exec rails server -p 3000 | ||
| worker: bundle exec rake jobs:work |
This file contains hidden or 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,49 @@ | ||
| FROM alpine:latest | ||
|
|
||
| LABEL Alec Pervushin <alec.for.public@gmail.com> | ||
|
|
||
| ENV RUBY_INSTALL_VERSION "0.7.0" | ||
| ENV RUBY_INSTALL_URL "https://github.com/postmodern/ruby-install/archive/v${RUBY_INSTALL_VERSION}.tar.gz" | ||
| ENV CHRUBY_VERSION '0.3.9' | ||
| ENV CHRUBY_URL "https://github.com/postmodern/chruby/archive/v${CHRUBY_VERSION}.tar.gz" | ||
|
|
||
| RUN apk update && \ | ||
| apk upgrade && \ | ||
| apk add --no-cache gnupg curl bash procps musl zlib openssl \ | ||
| patch make gcc g++ gnupg musl-dev linux-headers zlib-dev openssl-dev \ | ||
| postgresql-dev tzdata ruby readline-dev git nodejs yarn | ||
|
|
||
| SHELL ["/bin/bash", "-lc"] | ||
|
|
||
| WORKDIR /tmp | ||
|
|
||
| RUN curl -L -o ruby-install.tar.gz ${RUBY_INSTALL_URL} && \ | ||
| tar -xzvf ruby-install.tar.gz && \ | ||
| cd ruby-install-${RUBY_INSTALL_VERSION}/ && make install | ||
|
|
||
| ADD _docker-storage/current.tgz* /opt/ | ||
|
|
||
| COPY _docker-storage/install-railsexpress* /tmp/ | ||
| COPY .ruby-version* /root/ | ||
| COPY Gemfile* /tmp/ | ||
|
|
||
| RUN echo 'export RUBY_VERSION=$([ -z "$RUBY_VERSION" ] && cat ~/.ruby-version || "$RUBY_VERSION")' >> /etc/profile | ||
|
|
||
| ENV THREAD_PATCH "https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch" | ||
|
|
||
| RUN ./install-railsexpress railsexpress $RUBY_VERSION \ | ||
| -p ${THREAD_PATCH} --jobs=2 --cleanup --no-reinstall | ||
|
|
||
| RUN curl -L -o chruby.tar.gz ${CHRUBY_URL} && \ | ||
| tar -xzvf chruby.tar.gz && \ | ||
| cd chruby-${CHRUBY_VERSION}/ && make install && \ | ||
| echo "source /usr/local/share/chruby/chruby.sh" >> /etc/profile && \ | ||
| echo 'chruby $RUBY_VERSION' >> /etc/profile | ||
|
|
||
| RUN gem install bundler rb-readline && bundle check || \ | ||
| bundle install && gem install foreman | ||
|
|
||
| RUN apk del gnupg musl-dev linux-headers ruby && \ | ||
| rm -rf /tmp/* /var/cache/apk/* | ||
|
|
||
| COPY _docker-entrypoint.sh* / | ||
This file contains hidden or 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,145 @@ | ||
| version: "3.7" | ||
|
|
||
| services: | ||
| rails: | ||
| build: | ||
| context: . | ||
| dockerfile: _Dockerfile | ||
| stdin_open: true | ||
| tty: true | ||
| working_dir: /usr/src/app | ||
| networks: | ||
| courses-network: | ||
| aliases: | ||
| - rails | ||
| ports: | ||
| - 127.0.1.1:3000:3000 | ||
| volumes: | ||
| - .:/usr/src/app | ||
| - rubies:/opt/rubies | ||
| depends_on: | ||
| - db | ||
| - cache | ||
| - arc | ||
| environment: | ||
| RAILS_ENV: "local_production" | ||
| RACK_ENV: "local_production" | ||
| DATABASE_URL: "postgres://postgres:password@db/" | ||
| MEMCACHIER_SERVERS: "cache" | ||
| # ENABLE_HTTPS: "true" | ||
| RAILS_SERVE_STATIC_FILES: "true" | ||
| RAILS_LOG_TO_STDOUT: "true" | ||
| YARN_INTEGRITY_ENABLED: "false" | ||
| entrypoint: /_docker-entrypoint.sh | ||
| command: "bin/startup" | ||
|
|
||
| app: | ||
| image: nginx:1.15.12-alpine | ||
| depends_on: | ||
| - rails | ||
| networks: | ||
| courses-network: | ||
| aliases: | ||
| - app | ||
| volumes: | ||
| - ./_docker-storage/certs:/etc/nginx/certs | ||
| - ./_docker-storage/ssl.conf:/etc/nginx/conf.d/ssl.conf | ||
| ports: | ||
| - 127.0.1.1:3443:443 | ||
|
|
||
| db: | ||
| image: postgres:10-alpine | ||
| networks: | ||
| courses-network: | ||
| aliases: | ||
| - db | ||
|
|
||
| cache: | ||
| image: memcached:1.5.12-alpine | ||
| networks: | ||
| courses-network: | ||
| aliases: | ||
| - cache | ||
|
|
||
| arc: | ||
| image: alpine:latest | ||
| volumes: | ||
| - rubies:/cont/rubies | ||
| - ./_docker-storage:/host/docker | ||
| networks: | ||
| - courses-network | ||
| working_dir: /cont | ||
| entrypoint: tar -czf /host/docker/current.tgz rubies/ | ||
|
|
||
| pghero: | ||
| image: ankane/pghero | ||
| depends_on: | ||
| - db | ||
| ports: | ||
| - 127.0.1.1:8080:8080 | ||
| environment: | ||
| DATABASE_URL: "postgres://postgres:password@db/PracticalDeveloper_development" | ||
| networks: | ||
| - courses-network | ||
|
|
||
| sitespeed.io: | ||
| image: sitespeedio/sitespeed.io | ||
| networks: | ||
| - courses-network | ||
| command: -V | ||
| shm_size: 1g | ||
| volumes: | ||
| - ./sitespeed-result/:/sitespeed.io/sitespeed-result | ||
|
|
||
| grafana: | ||
| image: grafana/grafana:6.1.6 | ||
| depends_on: | ||
| - graphite | ||
| networks: | ||
| - courses-network | ||
| ports: | ||
| - "127.0.1.1:3000:3000" | ||
| environment: | ||
| - GF_SECURITY_ADMIN_PASSWORD=hdeAga76VG6ga7plZ1 | ||
| - GF_SECURITY_ADMIN_USER=sitespeedio | ||
| - GF_AUTH_ANONYMOUS_ENABLED=true | ||
| - GF_USERS_ALLOW_SIGN_UP=false | ||
| - GF_USERS_ALLOW_ORG_CREATE=false | ||
| volumes: | ||
| - grafana:/var/lib/grafana | ||
|
|
||
| graphite: | ||
| image: sitespeedio/graphite:1.1.5-3 | ||
| networks: | ||
| - courses-network | ||
| ports: | ||
| - "127.0.1.1:2003:2003" | ||
| - "127.0.1.1:8080:80" | ||
| volumes: | ||
| # In production you should configure/map these to your container | ||
| # Make sure whisper and graphite.db/grafana.db lives outside your containerr | ||
| # https://www.sitespeed.io/documentation/sitespeed.io/graphite/#graphite-for-production-important | ||
| - whisper:/opt/graphite/storage/whisper | ||
| # Download an empty graphite.db from https://github.com/sitespeedio/sitespeed.io/tree/master/docker/graphite | ||
| #- ./graphite/graphite.db:/opt/graphite/storage/graphite.db | ||
| #- ./graphite/conf/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf | ||
| #- ./graphite/conf/storage-aggregation.conf:/opt/graphite/conf/storage-aggregation.conf | ||
| #- ./graphite/conf/carbon.conf:/opt/graphite/conf/carbon.conf | ||
| grafana-setup: | ||
| image: sitespeedio/grafana-bootstrap:8.14.0 | ||
| networks: | ||
| - courses-network | ||
| depends_on: | ||
| - grafana | ||
| environment: | ||
| - GF_PASSWORD=hdeAga76VG6ga7plZ1 | ||
| - GF_USER=sitespeedio | ||
|
|
||
| networks: | ||
| courses-network: | ||
| name: courses-network | ||
|
|
||
| volumes: | ||
| rubies: | ||
| grafana: | ||
| whisper: |
This file contains hidden or 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,6 @@ | ||
| #! /bin/bash -l | ||
|
|
||
| chruby | ||
|
|
||
| # Execute the given or default command: | ||
| exec "$@" |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice email 👍