Skip to content

antoniomika/pdeploy-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdeploy Demo

This repository demonstrates how to use pdeploy to manage and expose services using Docker Compose.

Features

  • Automatic Builds: Define your build context in docker-compose.yml and pdeploy will handle the image creation.
  • HTTP Exposure: Easily expose services to the internet using standard Traefik labels.
  • Service Orchestration: Use multi-service Compose files to manage complex applications.

Building Applications

You can build your own applications directly from source by specifying a build context in your docker-compose.yml. This allows for a seamless "git push to deploy" workflow where the container image is built on the server.

Example from echo service:

services:
  echo:
    build: .
    # ... rest of configuration

In this example, pdeploy will use the local Dockerfile to build the application before deploying it.

Exposing HTTP Services

pdeploy provides an ingress controller, by default Traefik. To expose a service, you need to:

  1. Connect the service to the pdeploy-ingress network.
  2. Provide the necessary labels for routing.

Example Configuration

services:
  echo:
    build: .
    networks:
      - default
      - pdeploy-ingress
    labels:
      traefik.enable: true
      traefik.http.routers.echo.rule: Host(`echo-<user>.pdeploy.mik.qa`)

networks:
  pdeploy-ingress:
    external: true

Key Labels

  • traefik.enable=true: Tells the ingress controller to manage this service.
  • traefik.http.routers.<name>.rule=Host(...): Defines the domain name where the service will be accessible.

By default, *-<user>.pdeploy.mik.qa is forwarded to your pdeploy instance.

You can add a custom domain to pdeploy by using the following:

ssh pdeploy add-custom-domain example.com

You can now use example.com in the router rule.

Usage

git remote add pdeploy ssh://pdeploy.mik.qa:2222/user/project.git
git push pdeploy main

More commands are available from ssh pdeploy.mik.qa -p 2222 help

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors