-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from stv0g/fix-23
Fix MinIO setup and add Docker Compose file
- Loading branch information
Showing
16 changed files
with
330 additions
and
100 deletions.
There are no files selected for viewing
This file contains 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 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,9 1,14 @@ | ||
FROM alpine:3.15 | ||
|
||
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | ||
RUN apk update && apk add ca-certificates curl && rm -rf /var/cache/apk/* | ||
|
||
ENV GIN_MODE=release | ||
|
||
EXPOSE 8080/tcp | ||
|
||
HEALTHCHECK --interval=30s --timeout=30s --retries=3 \ | ||
CMD curl -f http://localhost:8080/api/v1/healthz | ||
|
||
COPY gose / | ||
|
||
ENTRYPOINT ["/gose"] |
This file contains 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 |
---|---|---|
|
@@ -111,30 111,25 @@ For reference have a look at the [example configuration file](config.yaml). | |
|
||
All settings from the configuration file can also be set via environment variables: | ||
|
||
| Variable | Example Value | Description | | ||
| :-- | :-- | :-- | | ||
| `GOSE_LISTEN` | `":8080"` | Listen address and port of Gose | | ||
| `GOSE_BASE_URL` | `"http://localhost:8080"` | Base URL at which Gose is accessible | | ||
| `GOSE_STATIC` | `"./dist"` | Directory of frontend assets if not bundled into the binary | | ||
| `GOSE_BUCKET` | `gose-uploads` | Name of S3 bucket | | ||
| `GOSE_ENDPOINT` | `s3.0l.de` | Hostname of S3 server | | ||
| `GOSE_REGION` | `s3` | Region of S3 server | | ||
| `GOSE_PATH_STYLE` | `true` | Prepend bucket name to path | | ||
| `GOSE_NO_SSL` | `false` | Disable SSL encryption for S3 | | ||
| `GOSE_ACCESS_KEY` | | S3 Access Key | | ||
| `GOSE_SECRET_KEY` | | S3 Secret Key | | ||
| `AWS_ACCESS_KEY_ID` | | alias for `GOSE_S3_ACCESS_KEY` | | ||
| `AWS_SECRET_ACCESS_KEY` | | alias for `AWS_SECRET_ACCESS_KEY` | | ||
| `GOSE_S3_MAX_UPLOAD_SIZE` | `5TB` | Maximum upload size | | ||
| `GOSE_S3_PART_SIZE` | `5MB` | Part-size for multi-part uploads | | ||
| `GOSE_S3_EXPIRATION_DEFAULT_CLASS` | `1week # one of the tags below` | Default expiration class | | ||
| `GOSE_SHORTENER_ENDPOINT` | `"https://shlink-api/rest/v2/short-urls/shorten?apiKey=<your-api-token>&format=txt&longUrl={{.UrlEscaped}}"` | API Endpoint of link shortener | | ||
| `GOSE_SHORTENER_METHOD` | `GET` | HTTP method for link shortener | | ||
| `GOSE_SHORTENER_RESPONSE` | `raw` | Response type of link shortener | | ||
| `GOSE_NOTIFICATION_URLS` | `pushover://shoutrrr:<api-token>@<user-key>?devices=laptop1&title=Upload` | Service URLs for [shoutrrr notifications](https://containrrr.dev/shoutrrr/) | | ||
| `GOSE_NOTIFICATION_TEMPLATE` | `"New Upload: {{.URL}}"` | Notification message template | | ||
| `GOSE_NOTIFICATION_MAIL_URL` | `smtp://user:password@host:port/[email protected]` | Service URLs for [shoutrrr notifications](https://containrrr.dev/shoutrrr/) | | ||
| `GOSE_NOTIFICATION_MAIL_TEMPLATE` | `"New Upload: {{.URL}}"` | Notification message template | | ||
| Variable | Default Value | Description | | ||
| :-- | :-- | :-- | | ||
| `GOSE_LISTEN` | `":8080"` | Listen address and port of Gose | | ||
| `GOSE_BASE_URL` | `"http://localhost:8080"` | Base URL at which Gose is accessible | | ||
| `GOSE_STATIC` | `"./dist"` | Directory of frontend assets if not bundled into the binary | | ||
| `GOSE_BUCKET` | `gose-uploads` | Name of S3 bucket | | ||
| `GOSE_ENDPOINT` | (without `http(s)://` prefix, but with port number) | Hostname:Port of S3 server | | ||
| `GOSE_REGION` | `us-east-1` | Region of S3 server | | ||
| `GOSE_PATH_STYLE` | `false` | Prepend bucket name to path | | ||
| `GOSE_NO_SSL` | `false` | Disable SSL encryption for S3 | | ||
| `GOSE_ACCESS_KEY` | | S3 Access Key | | ||
| `GOSE_SECRET_KEY` | | S3 Secret Key | | ||
| `GOSE_CREATE_BUCKET` | `true` | Create S3 bucket if non-existant | | ||
| `GOSE_MAX_UPLOAD_SIZE` | `1TB` | Maximum upload size | | ||
| `GOSE_PART_SIZE` | `16MB` | Part-size for multi-part uploads | | ||
| `AWS_ACCESS_KEY_ID` | | alias for `GOSE_ACCESS_KEY` | | ||
| `AWS_SECRET_ACCESS_KEY` | | alias for `GOSE_SECRET_KEY` | | ||
|
||
Configuration of link shortener and notifiers must be done via a [configuration file](#file). | ||
|
||
## Author | ||
|
||
|
This file contains 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 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 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,46 @@ | ||
--- | ||
version: "3.7" | ||
services: | ||
|
||
minio: | ||
image: minio/minio:RELEASE.2022-06-03T01-40-53Z.fips | ||
command: server /mnt/data --console-address ":9001" | ||
ports: | ||
- 9500:9500 # API | ||
- 9001:9001 # Webinterface | ||
environment: | ||
MINIO_ROOT_USER: "admin-user" # changeme! | ||
MINIO_ROOT_PASSWORD: "admin-pass" # changeme! | ||
MINIO_SERVER_URL: "http://localhost:9500" | ||
MINIO_SITE_REGION: "s3" | ||
volumes: | ||
- minio-data:/mnt/data | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9500/minio/health/ready"] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 | ||
|
||
gose: | ||
image: ghcr.io/stv0g/gose:v0.4.0 | ||
build: | ||
context: . | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
GOSE_LISTEN: ":8080" | ||
GOSE_BASE_URL: "http://localhost:8080" | ||
GOSE_BUCKET: "gose-uploads" | ||
GOSE_ENDPOINT: "minio:9500" | ||
GOSE_REGION: "s3" | ||
GOSE_PATH_STYLE: "true" | ||
GOSE_NO_SSL: "true" | ||
GOSE_ACCESS_KEY: "admin-user" # changeme! | ||
GOSE_SECRET_KEY: "admin-pass" # changeme! | ||
GOSE_MAX_UPLOAD_SIZE: "50GB" | ||
GOSE_PART_SIZE: "16MB" | ||
depends_on: | ||
- minio | ||
|
||
volumes: | ||
minio-data: |
This file contains 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 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 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 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
Oops, something went wrong.