Advertisement
yoesoff

docker-compose

Aug 17th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.98 KB | None | 0 0
  1. version: '3.1'
  2.  
  3. services:
  4.     doclearn_postgres:
  5.         image: postgres
  6.         ports:
  7.            - '5444:5432'
  8.         #restart: always
  9.  
  10.     doclearn_php_fpm:
  11.         build: ./docker/php-fpm
  12.         #ports:
  13.             #- "9004:9000"
  14.             #- "3004:3001"
  15.             #- "3004:3000"
  16.         volumes:
  17.            - ./public:/var/www
  18.             #http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm/  PHP is running in its own environment (container) it doesn't have access to the code.
  19.             - ./logs/nginx:/var/log/nginx/
  20.         links:
  21.            - doclearn_postgres
  22.         #restart: always
  23.  
  24.     doclearn_nginx:
  25.         build: ./docker/nginx
  26.         ports:
  27.            - "84:80"
  28.         depends_on:
  29.            - doclearn_php_fpm
  30.             - doclearn_postgres
  31.         links:
  32.            - doclearn_php_fpm
  33.         volumes:
  34.            - ./public:/var/www
  35.             - ./logs/nginx:/var/log/nginx/
  36.         #restart: always
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement