πDeploy an Application with a Dockerfile on Clouddley
Learn how to deploy an application using a Dockerfile on Clouddley.
Prerequisites
Creating a Dockerfile
# Use an official Node.js runtime as a parent image
FROM node:18-alpine
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json first for dependency installation
COPY package*.json ./
# Install dependencies
RUN npm install --omit=dev # Use --omit=dev for production builds
# Copy the rest of the application code
COPY . .
# Expose the application port (ensure it matches the port your app listens on)
EXPOSE 3011
# Define the command to run the application
CMD ["node", "./bin/www"]Building and Running the Container Locally
Deploying the Application
Accessing Apps

Step 1: Configure Service

Step 2: Configure Git

Step 3: Configure your Virtual Machine

Step 4: Configure app settings

Step 5: Configure Environment Variables



Step 6: Set up Notifications (optional)

Step 7: Test and Verify the app


Conclusion
Last updated