Skip to content

fix: Make deploy use new build scripts #406

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

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ database/generate: fmt/sql database/dump.sql database/query.sql
.PHONY: database/generate

docker/image/coder: build
cp ./images/coder/run.sh ./bin
docker build --network=host -t us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest -f images/coder/Dockerfile ./bin
cp ./images/coder/run.sh ./dist/coder_$(GOOS)_$(GOARCH)
docker build --network=host -t us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest -f images/coder/Dockerfile ./dist/coder_$(GOOS)_$(GOARCH)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this in your other PR where the binaries changed - we don't have a test for this yet, unfortunately (deploy isn't checked at all on PRs).

We could add a smoke test where we run the docker image and verify that we can curl and get the login page, to help make it easier to catch these in the future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh true!

.PHONY: docker/build

fmt/prettier:
Expand Down
12 changes: 4 additions & 8 deletions images/coder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ RUN yum install -y yum-utils
RUN yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
RUN yum install -y terraform

COPY coderd /coder/coderd
RUN chmod +x /coder/coderd
COPY coder /coder
RUN chmod +x /coder

COPY run.sh /coder/run.sh
RUN chmod +x /coder/run.sh

# Once `provisionerd` is available, we'll also need that binary
# COPY bin/provisionerd /provisionerd
# RUN chmod +x /provisionerd
Comment on lines -13 to -15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this!

COPY run.sh /run.sh
RUN chmod +x /run.sh

ENTRYPOINT ["/coder/run.sh"]
2 changes: 1 addition & 1 deletion images/coder/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ function create_initial_user() {
(
trap 'kill 0' SIGINT
create_initial_user &
/coder/coderd --address=":$PORT"
/coder daemon --address=":$PORT"
)