Go
Instructions for connecting your Go apps and deploying them on ToyStack
Step 1: Ensure your app is Dockerised
# Use the official Golang image as a base image
FROM golang:latest
# Set the working directory inside the container
WORKDIR /go/src/app
# Copy the local package files to the container's workspace
COPY . .
# Build the Go application
RUN go build -o app .
# Expose port 8080 to the outside world
EXPOSE 8080
# Command to run the executable
CMD ["./app"]Step 2: Import your Git repository
Step 3: Input environment variables
Step 4: Choose a plan

Step 5: Deploy
Last updated