daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Sep 4th, 2018 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3'
  2. services:
  3.   database:
  4.     image: mysql:5.7
  5.     volumes:
  6.      - dbdata:/var/lib/mysql
  7.       - ./etc/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
  8.     environment:
  9.      - "MYSQL_ROOT_PASSWORD=${DB_PASSWORD}"
  10.       - "MYSQL_DATABASE=${DB_DATABASE}"
  11.       - "MYSQL_USER=${DB_USERNAME}"
  12.       - "MYSQL_PASSWORD=${DB_PASSWORD}"
  13.     ports:
  14.      - "3306:3306"
  15.   cache:
  16.     image: redis:3.0-alpine
  17.     ports:
  18.     - "6379:6379"
  19.  
  20.   phpfpm:
  21.     build:
  22.       context: ./backend
  23.       dockerfile: ./../etc/phpfpm/app.docker
  24.     working_dir: /var/www
  25.     env_file:
  26.      - .env
  27.     volumes:
  28.      - ./backend:/var/www:rw
  29.       - ./project-uploads:/static:rw
  30.     links:
  31.      - database
  32.       - cache
  33.     ports:
  34.      - "9000:9000"
  35.  
  36.   static:
  37.     image: nginx:1.10.1
  38.     working_dir: /var/www
  39.     volumes:
  40.     - ./etc/backend/nginx.conf:/etc/nginx/nginx.conf
  41.      - ./etc/static/project-static.conf:/etc/nginx/conf.d/default.conf
  42.      - ./project-uploads:/var/www:ro
  43.     environment:
  44.       VIRTUAL_HOST: "static.project.app"
  45.       LETSENCRYPT_HOST: "static.project.app"
  46.       LETSENCRYPT_EMAIL: "project@project.app"
  47.     ports:
  48.     - "8083:80"
  49.  
  50.   backend:
  51.     image: nginx:1.10.1
  52.     volumes:
  53.      - ./etc/backend/nginx.conf:/etc/nginx/nginx.conf
  54.       - ./backend:/var/www:rw
  55.       - ./etc/backend/backend.conf:/etc/nginx/conf.d/default.conf
  56.     working_dir: /var/www
  57.     command: [nginx, '-g', 'daemon off;']
  58.     environment:
  59.       VIRTUAL_HOST: "backend.project.app"
  60.       LETSENCRYPT_HOST: "backend.project.app"
  61.       LETSENCRYPT_EMAIL: "project@project.app"
  62.     ports:
  63.      - "8080:80"
  64.     links:
  65.      - phpfpm
  66.  
  67.   main:
  68.     build:
  69.       context: ./backend
  70.       dockerfile: ./../etc/project/Dockerfile
  71.     working_dir: /var/www
  72.     hostname: "project.app"
  73.     volumes:
  74.     - ./etc/project/fstab:/etc/fstab
  75.      - ./project:/var/www
  76.     command: npm run server
  77.     environment:
  78.       VIRTUAL_HOST: "project.app"
  79.       LETSENCRYPT_HOST: "project.app"
  80.       LETSENCRYPT_EMAIL: "project@project.app"
  81.     ports:
  82.     - "7000:7000"
  83.     links:
  84.     - backend
  85.  
  86.   nginx-proxy:
  87.     image: jwilder/nginx-proxy
  88.     ports:
  89.      - "80:80"
  90.       - "443:443"
  91.     volumes:
  92.      - "/etc/nginx/vhost.d"
  93.       - "/usr/share/nginx/html"
  94.       - "/var/run/docker.sock:/tmp/docker.sock:ro"
  95.       - "/etc/nginx/certs"
  96.  
  97.     restart: always
  98.  
  99.   letsencrypt:
  100.     image: jrcs/letsencrypt-nginx-proxy-companion
  101.     environment:
  102.      - "NGINX_PROXY_CONTAINER=nginx-proxy"
  103.       - "NGINX_DOCKER_GEN_CONTAINER=nginx-proxy"
  104.     volumes:
  105.      - "/etc/nginx/vhost.d"
  106.       - "/usr/share/nginx/html"
  107.       - "/etc/nginx/certs"
  108.       - "/var/run/docker.sock:/var/run/docker.sock:ro"
  109.     links:
  110.      - nginx-proxy
  111.  
  112. volumes:
  113.  dbdata:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top