Created
July 8, 2019 21:01
-
-
Save dutsik/af6e51d168a6ebcba185377d34715f5f to your computer and use it in GitHub Desktop.
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
version: "3.4" | |
x-mailer: | |
&mailer | |
ADMIN_NAME: "Бендер Родригес" | |
ADMIN_EMAIL: 111@gmail.com | |
ADMIN_PASSWORD: 111 | |
DOMAIN_NAME: gmail.com | |
SMTP_SERVER: smtp.gmail.com | |
x-postgres_env: | |
&postgres_env | |
POSTGRES_HOST: postgresql | |
POSTGRES_PORT: 5432 | |
POSTGRES_DB: asd_development | |
POSTGRES_USER: 111 | |
POSTGRES_PASSWORD: 111 | |
services: | |
nginx: | |
image: nginx:1.11-alpine | |
volumes: | |
- ./docker/nginx:/conf | |
- ./public:/app/public | |
- ./log:/log | |
ports: | |
- 80:80 | |
- 443:443 | |
command: sh -c 'ln -sfn /conf/dev.nginx.conf /etc/nginx/conf.d/app.conf && sed -i -- "s/worker_processes 1;/worker_processes auto;/g" /etc/nginx/nginx.conf && exec nginx -g "daemon off;"' | |
depends_on: | |
- app | |
networks: | |
- net | |
postgresql: | |
image: mdillon/postgis:9.6-alpine | |
ports: | |
- "15432:5432" | |
networks: | |
- net | |
volumes: | |
- ./docker/db:/docker-entrypoint-initdb.d | |
- postgres-data:/var/lib/postgresql/data | |
environment: | |
<<: *postgres_env | |
app: | |
build: | |
context: ./ | |
dockerfile: ./docker/backend/Dockerfile | |
volumes: | |
- .:/usr/src/app:cached | |
- app-gems:/usr/local/bundle | |
command: sh -c "./entrypoint-dev.sh && bundle install && bundle exec puma --config config/puma.rb" | |
depends_on: | |
- postgresql | |
networks: | |
- net | |
environment: &backend_env | |
RAILS_ENV: development | |
<<: *postgres_env | |
PG_PORT: 5432 | |
PG_HOST: postgresql | |
PG_TIMEOUT: 5000 | |
PG_POOL: 5 | |
<<: *mailer | |
RAILS_LOG_TO_STDOUT: "true" | |
SECRET_KEY_BASE: heugbweruhbgwuer | |
stdin_open: true | |
tty: true | |
networks: | |
net: | |
ipam: | |
driver: default | |
volumes: | |
postgres-data: | |
driver: local | |
redis-data: | |
driver: local | |
app-gems: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment