СЛ
https://github.com/jwilder/nginx-proxy
Size: a a a
СЛ
GG
Д
BM
Д
AM
Д
BM
BM
Д
BM
npm build --only=prod --verbose
BM
BM
VS
VM
VS
VS
FROM ruby:2.5docker-compose.yml
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client tzdata imagemagick build-essential libreoffice nano vim
RUN if [ "$RAILS_ENV" = "development"]; then \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; \
dpkg -i google-chrome*.deb || apt update && apt-get install -f -y; \
fi
ARG APP_DIR=/apps/myapp
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR
COPY Gemfile $APP_DIR/Gemfile
COPY Gemfile.lock $APP_DIR/Gemfile.lock
RUN bundle install
COPY './.bashrc' /root/.bashrc
COPY . $APP_DIR
version: '3.7'
services:
nginx:
image: nginx
volumes:
- ./docker/nginx-site.conf:/etc/nginx/conf.d/default.conf
- nginx_cache:/cache
ports:
- "8080:8080"
links:
- web
command: /bin/bash -c "nginx -g 'daemon off;'"
db:
image: postgres
volumes:
- db_data:/var/lib/postgresql/data
web:
image: <my_image>
depends_on:
- db
- redis
command: bundle exec puma -C config/puma.rb
environment:
- PUMA_PIDFILE=/apps/myapp/tmp/puma.pid
- PUMA_PORT=3000
- PUMA_WORKERS=1
- LOG_LEVEL=debug
- RAILS_ENV=staging
- STAGING_DATABASE_USERNAME=postgres
- STAGING_DATABASE_HOST=db
- REDIS_HOST=redis
- REDIS_PORT=6379
- RAILS_LOG_TO_STDOUT=true
- WEB_CONSOLE_WHITELISTED_IPS=172.28.0.0/8
ports:
- "3000:3000"
volumes:
- .:/apps/myapp
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:rw
- ~/.bash_history:/root/.bash_history
- bundle:/usr/local/bundle
stdin_open: true
tty: true
redis:
image: redis:5
ports:
- 6379:6379
volumes:
db_data:
bundle:
nginx_cache:
VM
VS