title: How to do Laradock project deployment and workflow?
body: <p>I'm quite new to Docker, and currently, very confused.</p>
  
  <p>I'm trying to setup a dev environment using Laradock with the following containers:</p>
  
  <ol>
  <li>laravel(workspace image); </li>
  <li>php-fpm;</li>
  <li>postgres;</li>
  <li>pgadmin4;</li>
  <li>python(still not done with config);</li>
  <li>nginx.</li>
  </ol>
  
  <p>This works well on my local machine(a Mac), but I have no Idea how to upload the project on a server(which is my goal). And also I want to develop on the "production" server to check out response times, etc.</p>
  
  <p>I'm using <strong>docker</strong> and <strong>docker-compose</strong> for now.</p>
  
  <p>docker-compose.yml parts:</p>
  
  <pre><code>workspace:
    build:
      context: ./workspace
      args:
        - LARADOCK_PHP_VERSION=${PHP_VERSION}
        - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
        - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
        - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
        - INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
        - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
        - INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
        - INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
        - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
        - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
        - INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
        - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
        - INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP}
        - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
        - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
        - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
        - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
        - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
        - INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP}
        - INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
        - INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
        - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
        - INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
        - INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
        - AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
        - INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
        - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
        - COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
        - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
        - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
        - INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER}
        - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
        - INSTALL_PRESTISSIMO=${WORKSPACE_INSTALL_PRESTISSIMO}
        - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
        - INSTALL_MC=${WORKSPACE_INSTALL_MC}
        - INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
        - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
        - INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
        - INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
        - INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
        - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
        - INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
        - INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
        - INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
        - INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
        - INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
        - PUID=${WORKSPACE_PUID}
        - PGID=${WORKSPACE_PGID}
        - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
        - NODE_VERSION=${WORKSPACE_NODE_VERSION}
        - YARN_VERSION=${WORKSPACE_YARN_VERSION}
        - DRUSH_VERSION=${WORKSPACE_DRUSH_VERSION}
        - TZ=${WORKSPACE_TIMEZONE}
        - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
        - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
    volumes:
      - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
    extra_hosts:
      - "dockerhost:${DOCKER_HOST_IP}"
    ports:
      - "${WORKSPACE_SSH_PORT}:22"
    tty: true
    environment:
      - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
    networks:
      - frontend
      - backend
  </code></pre>
  
  <p>php-fpm:</p>
  
  <p><code>php-fpm:
        build:
          context: ./php-fpm
          args:
            - LARADOCK_PHP_VERSION=${PHP_VERSION}
            - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
            - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
            - INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
            - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
            - INSTALL_SSH2=${PHP_FPM_INSTALL_SSH2}
            - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
            - INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
            - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
            - INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP}
            - INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
            - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
            - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
            - INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
            - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
            - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
            - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
            - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
            - INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
            - AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
            - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
            - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
            - INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
            - INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
            - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
            - INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
            - INSTALL_PHALCON=${PHP_FPM_INSTALL_PHALCON}
            - INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
            - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
            - INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
            - INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
            - INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
            - INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
        volumes:
          - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
          - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
        expose:
          - "9000"
        extra_hosts:
          - "dockerhost:${DOCKER_HOST_IP}"
        environment:
          - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
          - DOCKER_HOST=tcp://docker-in-docker:2375
          - FAKETIME=${PHP_FPM_FAKETIME}
        depends_on:
          - workspace
        networks:
          - backend
        links:
          - docker-in-docker</code></p>
  
  <p>postgres:</p>
  
  <pre><code>postgres:
        image: postgres:latest
        ports:
          - "${POSTGRES_PORT}:${POSTGRES_PORT}"
        environment:
          - POSTGRES_DB=${POSTGRES_DB}
          - POSTGRES_USER=${POSTGRES_USER}
          - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
        networks:
          - backend
  </code></pre>
  
  <p>pgadmin4:</p>
  
  <pre><code>    pgadmin:
    build: ./pgadmin
    ports:
      - "5050:5050"
    volumes:
      - ${DATA_PATH_HOST}/pgadmin-backup:/var/lib/pgadmin/storage/pgadmin4
    depends_on:
      - postgres
    networks:
      - frontend
      - backend
  </code></pre>
  
  <p>nginx:</p>
  
  <pre><code>    nginx:
    build:
      context: ./nginx
      args:
        - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
        - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
        - CHANGE_SOURCE=${CHANGE_SOURCE}
    volumes:
      - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
      - ${NGINX_HOST_LOG_PATH}:/var/log/nginx
      - ${NGINX_SITES_PATH}:/etc/nginx/sites-available
      - ${NGINX_SSL_PATH}:/etc/nginx/ssl
    ports:
      - "${NGINX_HOST_HTTP_PORT}:80"
      - "${NGINX_HOST_HTTPS_PORT}:443"
    depends_on:
      - php-fpm
    networks:
      - frontend
      - backend
  </code></pre>
  
  <p>python:</p>
  
  <p>python:
        build:
          context: ./python-socket
        ports:
          - "9095:9095"
        volumes:
          - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}</p>
  
  <p><strong>Given that I have sftp access &amp; ssh access to the server, how to deploy and develop this project? Isn't there any simple way to deploy the project to the server and do fast code updates for testing purposes?</strong></p>