Deploy with
To deploy your Copper app on, you'll first need to containerize the app.
Create Dockerfile in your project root:
# syntax = docker/dockerfile:1-experimental
FROM node:18-alpine AS web-build
COPY web/ ./
RUN npm install
RUN npm run build
FROM golang:1.17-alpine AS go-build
RUN apk add build-base
RUN go install[email protected]
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
COPY . .
COPY --from=web-build /root/build ./web/build/.
RUN --mount=type=cache,target=/root/.cache/go-build copper build
FROM alpine:3.16
COPY config/ config/
COPY --from=go-build /root/build/migrate.out .
RUN ["./migrate.out", "--config", "config/prod.toml"]
COPY --from=go-build /root/build/app.out .
CMD ["./app.out", "--config", "config/prod.toml"]
Customize Dockerfile for your project like so:
  • If your project doesn't have a frontend, you can safely remove lines 2-9 and line 22
  • If your project doesn't use any storage, you can safely remove lines 32-33
Run flyctl launch to launch your app.
You can find more details on deploying your Docker app here:
Copy link