Skip to content
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

Add very basic docker support #223

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.github

18 changes: 18 additions & 0 deletions Admin's Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,35 @@ This document is for those who want to manage a self-hosted Devzat server.
Feel free to make a [new issue](https://github.com/quackduck/devzat/issues) if something doesn't work.

## Installation

First of all, clone the repository
```shell
git clone https://github.com/quackduck/devzat
cd devzat
```

### Manual
To compile Devzat, you will need Go installed with a minimum version of 1.17.

Now run `go install` to install the Devzat binary globally, or run `go build` to build and keep the binary in the working directory.

You may need to generate a new key pair for your server using the `ssh-keygen` command. When prompted, save as `devzat-sshkey` since this is the default location (it can be changed in the config).
While you can use the same key pair that your user account has, it is recommended to use a new key pair.

### Using docker

There is a Dockerfile in the project's repository

Build devzat's image by executing
```shell
docker build . -t devzat:latest
```

Run the image while making the container's port available to the host
```shell
docker run -p 8080:8080 devzat:latest
```

## Usage

```shell
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:1.22.5-alpine

WORKDIR /devzat

COPY . .

RUN go build

EXPOSE 8080
Copy link

Choose a reason for hiding this comment

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

The default port for the server is 2221, and the alternative one is 8080. Is there any specific reason why only the latter is specified? The EXPOSE instruction is only informative but still.

Copy link
Author

Choose a reason for hiding this comment

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

During my tests i've found that I can connect to the chatroom using port 8080 so I replicated that in the dockerfile. I've spent no more than 15 minutes on the dockerfile + PR, no idea if other configurations works but interested in figuring it out

Copy link
Owner

Choose a reason for hiding this comment

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

there's a bunch of ports used. you'd probably want to expose the rpc one and also both the ssh ones. please have a look at the source


CMD ./devzat