CloudPloy

Deploy with your own Dockerfile

If your repository has a Dockerfile at its root, CloudPloy builds it on your server and runs the image. Use this for any language or stack that the automatic build does not cover. PHP and Laravel apps are the exception: CloudPloy always builds those with its own PHP Dockerfile.

What your Dockerfile needs

  • It must be at the root of the repository and build without extra arguments.
  • The app must listen on the port in the PORT environment variable, on all addresses (0.0.0.0).
  • CloudPloy checks that the app answers on that port before it sends traffic to a new container.
  • Write logs to stdout and stderr.

A small example for a Node.js app:

FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
ENV PORT=3000
EXPOSE 3000
CMD ["node", "server.js"]

Deploy it

  1. In the console, choose New app.
  2. Pick the repository and branch. Leave the type on Detect automatically: CloudPloy finds the Dockerfile.
  3. Pick the server and deploy.

CloudPloy builds one image from the Dockerfile. It does not run a docker-compose.yml from your repository, so services such as a database must run somewhere else.

Environment variables

Set environment variables on the app page. Mark a value as Secret to store it encrypted; it cannot be viewed again after you save it. CloudPloy gives the app its values when it starts, plus PORT, APP_URL and PRIMARY_DOMAIN. Deploy again after you change a variable.

Deploys, logs and rollback

  • Each deploy builds a new container. The old one keeps serving until the new one is ready. If a deploy fails, the old version stays live.
  • Turn on automatic deploys on the app page to deploy on every push to the branch.
  • The app page shows the build log of each deploy and the latest lines your app writes to stdout and stderr. Write your logs there, not to files.
  • Use Rollback on the app page to go back to the version that was live before.
  • Run more copies of the app with its Scale settings. CloudPloy does not scale apps automatically.

Domains

Every app gets an address under cloudploy-apps.link with HTTPS. To use your own domain, see Add a custom domain.

What CloudPloy does not do yet

  • It does not run databases, Redis or other services for you. Use a database you run yourself and set its connection in the environment variables.
  • It keeps no files between deploys. Each deploy starts a fresh container, so store uploads in object storage such as Amazon S3.
  • It does not back up your app or your data.