upstream addcpm-backend {
    server php:9000;
}
server {
    listen 80;

    root /var/www/code/public;

    location / {
        index  index.php index.html;
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass    addcpm-backend;
        fastcgi_index   index.php;

        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
