-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to deploy Bud to Real-world ? #202
Comments
Hey @gunnrcrakr, I'm working on documentation for this! Right now it'd be a bit manual:
|
Do I have to install livebud on that ec2 ? |
This is what I've been working with for running the bud app with docker: FROM golang:1.18.4-buster
# install node & npm
RUN apt-get update
RUN apt-get install -y curl
RUN curl sL https://deb.nodesource.com/setup_16.x | bash
RUN apt-get install -y nodejs
# install bud
RUN curl -sf https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh
# build your app
COPY . /app
WORKDIR /app
# will not work if you have the broken relative path in go.mod
RUN bud build
EXPOSE 3000
EXPOSE 35729
ENTRYPOINT ./bud/app --listen 0.0.0.0:3000 --log debug
# docker run -it -p 3000:3000 -p 35729:35729 <image-name> |
The best way is to build in a builder container and then copy to a scratch container just the build. Then push to an docker registry so we can download the latest version. |
Here is how I'm doing it @inluxc FROM node:18-buster AS builder
COPY --from=golang:1.19-buster /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"
RUN curl -sf curl https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh -s 0.2.8
WORKDIR /app
COPY . /app
RUN npm install
RUN go mod download
RUN bud build
FROM debian:buster-slim
RUN apt-get update && apt-get install -y ca-certificates openssl
ARG cert_location=/usr/local/share/ca-certificates
RUN update-ca-certificates
COPY --from=builder /app/bud/app /
COPY --from=builder /app/go.mod /
EXPOSE 3000
ENTRYPOINT ./app --listen 0.0.0.0:3000 |
I want to deploy to ec2, or heroku. How can I do that ? (I'm newbie)
The text was updated successfully, but these errors were encountered: