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

Commit423260c

Browse files
bpmctkylecarbs
authored andcommitted
feat: one-line install script (#1924)
* feat: one-line install script* remove homebrew support* remove arch linux* use proper filename for packages* fix variable format* fix systemd instructions* fixes to standalone script* fix missing var bugs* fix standalone install* fix for MacOS* format* fix armv7 assets and zips* remove windows* update install docs* support external sources with shellcheck* shfmt* add external sources to GitHub action & unfold* change wording* first template docs* default to /usr/local instead* add option for binary name
1 parent2eedcc8 commit423260c

File tree

5 files changed

+640
-81
lines changed

5 files changed

+640
-81
lines changed

‎.github/workflows/coder.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
-uses:actions/checkout@v3
5353
-name:Run ShellCheck
5454
uses:ludeeus/action-shellcheck@1.1.0
55+
env:
56+
SHELLCHECK_OPTS:--external-sources
5557
with:
5658
ignore:node_modules
5759

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ lint/go:
7171
# Use shfmt to determine the shell files, takes editorconfig into consideration.
7272
lint/shellcheck:$(shell shfmt -f .)
7373
@echo"--- shellcheck"
74-
shellcheck$(shell shfmt -f .)
74+
shellcheck--external-sources$(shell shfmt -f .)
7575

7676
peerbroker/proto/peerbroker.pb.go: peerbroker/proto/peerbroker.proto
7777
protoc\

‎README.md

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -56,47 +56,25 @@ You can use any Web IDE ([code-server](https://github.com/coder/code-server), [p
5656

5757
##Installing Coder
5858

59-
We recommend installing[the latest
60-
release](https://github.com/coder/coder/releases) on a system with at least 1
61-
CPU core and 2 GB RAM:
59+
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).
6260

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

66-
```sh
67-
# ex. MacOS and Linux
68-
mv coder /usr/local/bin
69-
```
70-
71-
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`
72-
73-
There are a few ways to run Coder:
74-
75-
- To run a**temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):
76-
77-
```bash
78-
coder server --dev
79-
```
80-
81-
- To run a**production deployment** with PostgreSQL:
82-
83-
```bash
84-
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
85-
coder server
86-
```
63+
```sh
64+
curl -fsSL https://coder.com/install.sh| sh -s -- --dry-run
65+
```
8766

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

90-
```bash
91-
# Edit the configuration!
92-
sudo vim /etc/coder.d/coder.env
93-
sudo service coder restart
94-
```
69+
```sh
70+
curl -fsSL https://coder.com/install.sh| sh
71+
```
9572

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

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

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

‎docs/install.md

Lines changed: 69 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

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

5+
##install.sh
6+
7+
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
8+
attempts to use the system package manager detection-reference if possible.
9+
10+
You can preview what occurs during the install process:
11+
12+
```bash
13+
curl -L https://coder.com/install.sh| sh -s -- --dry-run
14+
```
15+
16+
To install, run:
17+
18+
```bash
19+
curl -L https://coder.com/install.sh| sh
20+
```
21+
22+
>If you're concerned about the install script's use of`curl | sh` and the
23+
>security implications, please see[this blog
24+
>post](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install)
25+
>by[sandstorm.io](https://sandstorm.io).
26+
27+
You can modify the installation process by including flags. Run the help command for reference:
28+
29+
```bash
30+
curl -L https://coder.com/install.sh| sh -s -- --help
31+
```
32+
33+
##System packages
34+
35+
Coder publishes the following system packages[in GitHub releases](https://github.com/coder/coder/releases):
36+
37+
- .deb (Debian, Ubuntu)
38+
- .rpm (Fedora, CentOS, RHEL, SUSE)
39+
- .apk (Alpine)
40+
41+
Once installed, you can run Coder as a system service:
42+
43+
```sh
44+
# Specify a PostgreSQL database
45+
# in the configuration first:
46+
sudo vim /etc/coder.d/coder.env
47+
sudo service coder restart
48+
```
49+
50+
Or run a**temporary deployment** with dev mode (all data is in-memory and destroyed on exit):
51+
52+
53+
```sh
54+
coder server --dev
55+
```
56+
557
##docker-compose
658

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

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

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

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

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

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

60-
```console
61-
cd docker
62-
codertemplates create
105+
```sh
106+
# ex. MacOS and Linux
107+
mvcoder/usr/local/bin
63108
```
64109

65-
Follow the prompts displayed to proceed. When done, you'll see the following
66-
message:
110+
> 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`.
67111

68-
```console
69-
The docker template has been created! Developers can
70-
provision a workspace with this template using:
112+
1. Start a Coder server
71113

72-
coder create --template="docker" [workspace name]
73-
```
74-
75-
1. At this point, you're ready to provision your first workspace:
114+
To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):
76115

77-
```console
78-
codercreate --template="docker" [workspace name]
116+
```bash
117+
coderserver --dev
79118
```
80119

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

84-
```console
85-
┌─────────────────────────────────────────────────────────────────┐
86-
│ RESOURCE STATUS ACCESS │
87-
├─────────────────────────────────────────────────────────────────┤
88-
│ docker_container.workspace ephemeral │
89-
│ └─ dev (linux, amd64) ⦾ connecting [0s] coder ssh main │
90-
├─────────────────────────────────────────────────────────────────┤
91-
│ docker_volume.coder_volume ephemeral │
92-
└─────────────────────────────────────────────────────────────────┘
93-
The main workspace has been created!
122+
```bash
123+
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
124+
coder server
94125
```
95-
96-
You can now access your workspace via your web browser by navigating to your
97-
access URL, or you can connect to it via SSH by running:
98-
99-
```console
100-
coder ssh [workspace name]
101-
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp