Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name symfony3.dev www.symfony3.dev;
- root /app/web;
- location / {
- # try to serve file directly, fallback to app.php
- try_files $uri /app.php$is_args$args;
- }
- # DEV
- # This rule should only be placed on your development environment
- # In production, don't include this and don't deploy app_dev.php or config.php
- # location ~ ^/(app_dev|config)\.php(/|$) {
- # fastcgi_pass php:9000;
- # fastcgi_split_path_info ^(.+\.php)(/.*)$;
- # include fastcgi_params;
- # # When you are using symlinks to link the document root to the
- # # current version of your application, you should pass the real
- # # application path instead of the path to the symlink to PHP
- # # FPM.
- # # Otherwise, PHP's OPcache may not properly detect changes to
- # # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
- # # for more information).
- # fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
- # fastcgi_param DOCUMENT_ROOT $realpath_root;
- # }
- # PROD
- location ~ ^/app\.php(/|$) {
- fastcgi_pass php:9000;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- # When you are using symlinks to link the document root to the
- # current version of your application, you should pass the real
- # application path instead of the path to the symlink to PHP
- # FPM.
- # Otherwise, PHP's OPcache may not properly detect changes to
- # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
- # for more information).
- fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
- fastcgi_param DOCUMENT_ROOT $realpath_root;
- # Prevents URIs that include the front controller. This will 404:
- # http://symfony3.dev/app.php/some-path
- # Remove the internal directive to allow URIs like this
- internal;
- }
- }
- docker-compose.production.yml:
- version: '2'
- services:
- # The Application
- php:
- image: cityhub:5000/symfony-deploy/app
- volumes:
- # - ./storage:/app/storage
- - /app
- # env_file: '.env.prod'
- environment:
- - "DB_HOST=database"
- - "REDIS_HOST=cache"
- # The Web Server
- web:
- image: cityhub:5000/symfony-deploy/web
- # volumes_from:
- # - app
- # volumes:
- # - "${LE_DIR}:/etc/letsencrypt"
- ports:
- - 80:80
- # - 443:443
- # The Database
- database:
- image: mysql:5.6
- volumes:
- - ./dbdata:/var/lib/mysql
- - ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
- environment:
- MYSQL_ROOT_PASSWORD: vdab
- MYSQL_DATABASE: symfony-deploy-test
- MYSQL_USER: user
- MYSQL_PASSWORD: userpass
- # environment_file: .env
- # redis
- # cache:
- # image: redis:3.0-alpine
- #
- # volumes:
- # dbdata:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement