Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: one-line install script#1924

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bpmct merged 21 commits intomainfrombpmct/installscript
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
21 commits
Select commitHold shift + click to select a range
006a805
feat: one-line install script
bpmctMay 31, 2022
2724aef
remove homebrew support
bpmctMay 31, 2022
f7a5ee8
remove arch linux
bpmctMay 31, 2022
c3505ed
use proper filename for packages
bpmctMay 31, 2022
5d23600
fix variable format
bpmctMay 31, 2022
936c466
fix systemd instructions
bpmctMay 31, 2022
086e30e
fixes to standalone script
bpmctMay 31, 2022
3a65b94
fix missing var bugs
bpmctMay 31, 2022
26ab867
fix standalone install
bpmctMay 31, 2022
3568085
fix for MacOS
bpmctMay 31, 2022
a022e3b
format
bpmctMay 31, 2022
038dc8c
fix armv7 assets and zips
bpmctMay 31, 2022
fa59da0
remove windows
bpmctMay 31, 2022
bec5584
update install docs
bpmctJun 1, 2022
c308d60
support external sources with shellcheck
bpmctJun 1, 2022
8989211
shfmt
bpmctJun 1, 2022
cf1912a
add external sources to GitHub action & unfold
bpmctJun 1, 2022
a611c7b
change wording
bpmctJun 1, 2022
a16a04a
first template docs
bpmctJun 1, 2022
6879752
default to /usr/local instead
bpmctJun 1, 2022
8cba04c
add option for binary name
bpmctJun 1, 2022
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
2 changes: 2 additions & 0 deletions.github/workflows/coder.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,6 +52,8 @@ jobs:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@1.1.0
env:
SHELLCHECK_OPTS: --external-sources
Comment on lines +55 to +56
Copy link
MemberAuthor

@bpmctbpmctJun 1, 2022
edited
Loading

Choose a reason for hiding this comment

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

This resolved some warnings around unspecified inputs. Seehttps://www.mankier.com/1/shellcheck#-x andkoalaman/shellcheck#902

The error was only for `/etc/os-release` in the script
$makelint/shellcheckIninstall.shline424:./etc/os-release^-------------^SC1091:Notfollowing:/etc/os-releasewasnotspecifiedasinput(seeshellcheck-x).Ininstall.shline450:./etc/os-release^-------------^SC1091:Notfollowing:/etc/os-releasewasnotspecifiedasinput(seeshellcheck-x).

kylecarbs reacted with thumbs up emoji
with:
ignore: node_modules

Expand Down
2 changes: 1 addition & 1 deletionMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,7 @@ lint/go:
# Use shfmt to determine the shell files, takes editorconfig into consideration.
lint/shellcheck: $(shell shfmt -f .)
@echo "--- shellcheck"
shellcheck $(shell shfmt -f .)
shellcheck--external-sources$(shell shfmt -f .)

peerbroker/proto/peerbroker.pb.go: peerbroker/proto/peerbroker.proto
protoc \
Expand Down
48 changes: 13 additions & 35 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,47 +56,25 @@ You can use any Web IDE ([code-server](https://github.com/coder/code-server), [p

## Installing Coder

We recommend installing [the latest
release](https://github.com/coder/coder/releases) on a system with at least 1
CPU core and 2 GB RAM:
There are a few ways to install Coder: [install script](./docs/install.md#installsh) (macOS, Linux), [docker-compose](./docs/install.md#docker-compose), or [manually](./docs/install.md#manual) via the latest release (macOS, Windows, and Linux).

1. Download the [release asset](https://github.com/coder/coder/releases) appropriate for your operating system
1. Unzip the folder you just downloaded, and move the `coder` executable to a location that's on your `PATH`
If you use the install script, you can preview what occurs during the install process:

```sh
# ex. MacOS and Linux
mv coder /usr/local/bin
```

Windows: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) on adding a folder to `PATH`

There are a few ways to run Coder:

- To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):

```bash
coder server --dev
```

- To run a **production deployment** with PostgreSQL:

```bash
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
coder server
```
```sh
curl -fsSL https://coder.com/install.sh | sh -s -- --dry-run
```

-Torun as a **system service**,install with `.deb` (Debian, Ubuntu) or `.rpm` (Fedora, CentOS, RHEL, SUSE):
To install, run:

```bash
# Edit the configuration!
sudo vim /etc/coder.d/coder.env
sudo service coder restart
```
```sh
curl -fsSL https://coder.com/install.sh | sh
```

> macOS and Windows users: You'll need to write your own
> configuration to run Coder as a system service.
Once installed, you can run a temporary deployment in dev mode (all data is in-memory and destroyed on exit):

- See the [installation guide](./docs/install.md) for additional ways to run Coder (e.g., docker-compose)
```sh
coder server --dev
```

Use `coder --help` to get a complete list of flags and environment variables.

Expand Down
114 changes: 69 additions & 45 deletionsdocs/install.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,58 @@

This article walks you through the various ways of installing and deploying Coder.

## install.sh

The easiest way to install Coder is to use our [install script](https://github.com/coder/coder/main/install.sh) for Linux and macOS. The install script
attempts to use the system package manager detection-reference if possible.

You can preview what occurs during the install process:

```bash
curl -L https://coder.com/install.sh | sh -s -- --dry-run
```

To install, run:

```bash
curl -L https://coder.com/install.sh | sh
```

> If you're concerned about the install script's use of `curl | sh` and the
> security implications, please see [this blog
> post](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install)
> by [sandstorm.io](https://sandstorm.io).

You can modify the installation process by including flags. Run the help command for reference:

```bash
curl -L https://coder.com/install.sh | sh -s -- --help
```

## System packages

Coder publishes the following system packages [in GitHub releases](https://github.com/coder/coder/releases):

- .deb (Debian, Ubuntu)
- .rpm (Fedora, CentOS, RHEL, SUSE)
- .apk (Alpine)

Once installed, you can run Coder as a system service:

```sh
# Specify a PostgreSQL database
# in the configuration first:
sudo vim /etc/coder.d/coder.env
sudo service coder restart
```

Or run a **temporary deployment** with dev mode (all data is in-memory and destroyed on exit):


```sh
coder server --dev
```

## docker-compose
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@khorne3 I feel like this section is a bit too long. Thoughts on stopping afterdocker-compose up?

Copy link
Contributor

@khorne3khorne3Jun 1, 2022
edited
Loading

Choose a reason for hiding this comment

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

I think afterdocker-compose up say, "Follow the on-screen instructions" so people aren't left hanging and then omit the remainder


Before proceeding, please ensure that you have both Docker and the [latest version of
Expand DownExpand Up@@ -40,62 +92,34 @@ Coder](https://github.com/coder/coder/releases) installed.
ghcr.io/coder/coder:v0.5.10
```

1. Open a new terminal window, and run `coder login <yourAccessURL>` to create
your first user (once you've done so, you can navigate to `yourAccessURL` and
log in with these credentials).
1. Follow the on-screen instructions to create your first template and workspace

1. Next, copy a sample template into a new directory so that you can create a custom template in a
subsequent step (be sure that you're working in the directory where you want
your templates stored):
## Manual

```console
coder templates init
```
We publish self-contained .zip and .tar.gz archives in [GitHub releases](https://github.com/coder/coder/releases). The archives bundle `coder` binary.

Choose the "Develop in Docker" example to generate a sample template in the
`docker` subdirectory.
1. Download the [release archive](https://github.com/coder/coder/releases) appropriate for your operating system

1.Navigate intothenew directoryandcreate a new template:
1.Unzipthefolder you just downloaded,andmove the `coder` executable to a location that's on your `PATH`

```console
cd docker
codertemplates create
```sh
# ex. MacOS and Linux
mvcoder/usr/local/bin
```

Follow the prompts displayed to proceed. When done, you'll see the following
message:
> Windows users: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) for adding folders to `PATH`.

```console
The docker template has been created! Developers can
provision a workspace with this template using:
1. Start a Coder server

coder create --template="docker" [workspace name]
```

1. At this point, you're ready to provision your first workspace:
To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):

```console
codercreate --template="docker" [workspace name]
```bash
coderserver --dev
```

Follow the on-screen prompts to set the parameters for your workspace. If
the process is successful, you'll get information regarding your workspace:
To run a **production deployment** with PostgreSQL:

```console
┌─────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS ACCESS │
├─────────────────────────────────────────────────────────────────┤
│ docker_container.workspace ephemeral │
│ └─ dev (linux, amd64) ⦾ connecting [0s] coder ssh main │
├─────────────────────────────────────────────────────────────────┤
│ docker_volume.coder_volume ephemeral │
└─────────────────────────────────────────────────────────────────┘
The main workspace has been created!
```bash
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
coder server
```

You can now access your workspace via your web browser by navigating to your
access URL, or you can connect to it via SSH by running:

```console
coder ssh [workspace name]
```
Loading

[8]ページ先頭

©2009-2025 Movatter.jp