-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
docker #258
docker #258
Conversation
Originally that issue was for @vednoc not to forget try come back to it later. Now you're ahead of him! Tried to compose, got the following:
Seems to be some paths or go-specific problem, IDK. |
Now it ran for a little bit longer and gave me I should notice that we do |
@a0eoc try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for taking the time out of your day to hack on USw and contribute!
Overall, everything looks good. However, as @a0eoc mentioned, development workflow is really slow due to having to rebuild image/container whenever something changes. I propose adding another service/target for development environment, where we'll be able to utilize live reload to drastically speed up and improve this process.
I made a minimal set of changes to test out this idea. Apply the following:
tools/run
(fixes missing step during setup)
setup() {
all)
- setup fonts; setup ts; setup sass
+ setup fonts; setup ts; setup sass; setup go
docker-compose.yaml
(mount the entire directory)
build:
dockerfile: Dockerfile
context: .
+ volumes:
+ - ".:/src"
ports: ["3000:3000"]
Dockerfile
(copy-paste this snippet, and comment out the rest)
FROM docker.io/library/golang:1.20.6-alpine3.18
WORKDIR /src
RUN apk add --no-cache build-base git sassc vips-tools
RUN go install github.com/cosmtrek/air@latest
RUN git config --global safe.directory '*'
COPY . /src
RUN tools/run setup
CMD tools/run watch all
@vednoc |
I believe my changes solve the former, your changes solve the letter. We can combine them to solve both problems. Additionally, I'd like to add some other services to help during development. |
Hey @Li-Gru, I believe we had a misunderstanding and I'm unsure how to move forward. If you don't mind, I would reopen this PR and merge your changes. Afterwards, I will add a separate configuration that resolves the development problem. My idea was to implement them both in this PR, but I'll take care of the rest since I have it (mostly) figured out. |
I don't mind, I just solved my problem |
add Dockerfile + docker-entrypoint.sh
add docker-compose.yaml