A quick guide to containerizing your application and shipping it to the production server.
Ensure your project root includes a Dockerfile. This file defines the environment your webapp needs to run.
Example for a basic Node/Python/Static webapp:
# Example Dockerfile FROM node:18-alpine WORKDIR /app COPY package*.json ./ RUN npm install COPY . . EXPOSE 3000 CMD ["npm", "start"]
Create a docker-compose.yml file in your root directory. This manages your app container and any required sidecars (like databases or reverse proxies).
version: '3.8'
services:
webapp:
build: .
ports:
- "80:3000"
restart: always
environment:
- NODE_ENV=production
Before transferring, compress your project files (excluding node_modules, venv, or local build artifacts) into a clean archive.
Run this command in your terminal:
tar -czf webapp-deploy.tar.gz --exclude='node_modules' --exclude='.git' .
Send your prepared package to the following email address to get it deployed.
simone |dot| scalabrino |at| unimol |dot| it