Step 1
Prepare your app
Goldenhost runs Docker containers. This page covers the small amount of Docker you need before your first deploy.
What Docker does
A Dockerfile is a recipe for your app. It describes the base system, installs dependencies, copies your code, and starts the server. Goldenhost builds that recipe and runs the result.
Install Docker locally (optional)
You do not need Docker on your computer to deploy, but building locally catches mistakes early. Install Docker Desktop on Windows or macOS, or Docker Engine on Linux.
docker --version
docker run hello-worldA minimal Dockerfile
This example builds a Node.js app. Use the same structure for any runtime: install, copy, expose one port, start.
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
ENV NODE_ENV=production
EXPOSE 3000
CMD ["npm", "start"]Build and run it
docker build -t my-app .
docker run --rm -p 3000:3000 -e DATABASE_URL="..." my-appOpen http://localhost:3000. If it works locally, it should work on Goldenhost.
Rules that prevent most deploy failures
- • Listen on
0.0.0.0, not127.0.0.1. - • Expose one HTTP port and use the same port in your project settings.
- • Read secrets from environment variables, never from committed files.
- • Keep the final image small; demo images are capped at 512 MB.
- • Do not write important files inside the container. Use a database or a mounted storage path.
- • Make the app exit with an error if a required variable is missing.
A good .dockerignore
.git
node_modules
.next
.env*
npm-debug.log*Environment variables
Anything that changes between environments belongs in a variable: database URL, API keys, mail credentials, public base URL. Add them in the project's Environment tab after you create the app.
.env file. Add it to .gitignore and set the values in the dashboard.Push to a repository
Goldenhost deploys from a Git repository URL. Push your Dockerfile and code to GitHub, GitLab, or any reachable Git host. If the repository is private, contact support so we can arrange access before your first deploy.
Next
Once the app builds and runs locally, continue to deploy it from the dashboard.