-
Notifications
You must be signed in to change notification settings - Fork 897
chore: Add dockerfile for deployment #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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2abd00e
Initial dockerfile + make step
bryphe-coder 277e602
Add comment for provisionerd
bryphe-coder f97ea9a
Dockerfile tweaks
bryphe-coder 704ed10
Remove init script for now
bryphe-coder 1eb62aa
Fix missed docker/build -> docker/image/coder
bryphe-coder 584a231
Tweak tag name, add SHA version
bryphe-coder 33e4346
Merge branch 'main' into bryphe/chore/add-docker-image
bryphe-coder 4f5a081
Merge main
bryphe-coder 6cf4437
Merge branch 'bryphe/chore/add-docker-image' of github.com:coder/code…
bryphe-coder b9d8d45
add run script
jawnsy bed54b2
Remove bin/provisionerd from Makefile
bryphe-coder e392b3c
try this
jawnsy 222049e
setup go
jawnsy ee69dc5
push image
jawnsy 5153c06
add permissions
jawnsy 25ec9ec
style fmt
jawnsy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add run script
- Loading branch information
commit b9d8d45c20d3c4f074fca244ca7ae980bfdba187
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
FROM postgres:14.0 | ||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
COPY coderd /coderd | ||
RUN chmod +x /coderd | ||
COPY coderd /coder/coderd | ||
RUN chmod +x /coder/coderd | ||
|
||
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 | ||
|
||
ENTRYPOINT ["/coderd"] | ||
CMD ["--address", "127.0.0.1:8000"] | ||
ENTRYPOINT ["/coder/run.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
EMAIL=${EMAIL:-admin@coder.com} | ||
USERNAME=${USERNAME:-admin} | ||
ORGANIZATION=${ORGANIZATION:-ACME-Corp} | ||
PASSWORD=${PASSWORD:-password} | ||
PORT=${PORT:-8000} | ||
|
||
# Helper to create an initial user | ||
function create_initial_user() { | ||
# TODO: We need to wait for `coderd` to spin up - | ||
# need to replace with a deterministic strategy | ||
sleep 5s | ||
|
||
curl -X POST \ | ||
-d '{"email": "'"$EMAIL"'", "username": "'"$USERNAME"'", "organization": "'"$ORGANIZATION"'", "password": "'"$PASSWORD"'"}' \ | ||
-H 'Content-Type:application/json' \ | ||
"http://localhost:$PORT/api/v2/user" | ||
} | ||
|
||
# This is a way to run multiple processes in parallel, and have Ctrl-C work correctly | ||
# to kill both at the same time. For more details, see: | ||
# https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script | ||
( | ||
trap 'kill 0' SIGINT | ||
create_initial_user & | ||
/coder/coderd --address=":$PORT" | ||
) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.