Deployment

The easiest way to deploy your pckg app is by using Docker Compose. The example below shows you how to run a multiple stacks with:

  • HAProxy + Letsencrypt at entrypoint

  • MySQL, Redis and RabbitMQ as a system services

  • Apache + PHP for the web/app server

Docker Compose (Swarm)

docker
|- build
|-|- Dockerfile
|- compose
|-|- docker-compose.entrypoint.prod.yml
|-|- docker-compose.entrypoint.yml
|-|- docker-compose.system.dev.yml
|-|- docker-compose.system.prod.yml
|-|- docker-compose.system.yml
|-|- docker-compose.www.dev.yml
|-|- docker-compose.www.prod.yml
|-|- docker-compose.www.yml
|- config
|-|- apache.conf
|-|- haproxy.cfg
|-|- ssl-list.txt
|- env
|-|- .env.database.docker
|-|- .env.rabbit.docker
|-|- .env.redis.docker
|-|- .env.web.docker

Entrypoint

Entrypoint is only needed in production environment.

System

App

Deployment

Deploy entrypoint stack.

Deploy system services.

Deploy app.

Production

You need to pack your code first.

Development

Run temp docker container with Apache + PHP FPM + MySQL + Redis + Composer + Yarn + Webpack + a lot more.

CLI (with Docker Compose - Swarm)

If you have installed Pckg CLI, you can use it to automatically deploy your app to the local/dev environment or remote environment by providing SSH keys.

VPS

Shared hosting

Last updated

Was this helpful?