-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: TUI only accessible via pico.sh
BREAKING CHANGE: TUI only accessible via pico.sh
- Loading branch information
Showing
50 changed files
with
248 additions
and
1,304 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ MINIO_PROMETHEUS_AUTH_TYPE=public | |
MINIO_PROMETHEUS_URL= | ||
MINIO_PROMETHEUS_JOB_ID=minio | ||
|
||
USE_IMGPROXY=1 | ||
IMGPROXY_DOMAIN=imgproxy.dev.pico.sh | ||
IMGPROXY_URL=http://imgproxy:8080 | ||
IMGPROXY_ALLOWED_SOURCES=s3://,local:// | ||
|
@@ -27,27 +26,6 @@ AWS_SECRET_ACCESS_KEY=$MINIO_ROOT_PASSWORD | |
IMGPROXY_PROMETHEUS_BIND=:8081 | ||
IMGPROXY_PROMETHEUS_NAMESPACE=imgproxy | ||
|
||
LISTS_CADDYFILE=./caddy/Caddyfile | ||
LISTS_V4= | ||
LISTS_V6= | ||
LISTS_HTTP_V4=$LISTS_V4:80 | ||
LISTS_HTTP_V6=[$LISTS_V6]:80 | ||
LISTS_HTTPS_V4=$LISTS_V4:443 | ||
LISTS_HTTPS_V6=[$LISTS_V6]:443 | ||
LISTS_SSH_V4=$LISTS_V4:22 | ||
LISTS_SSH_V6=[$LISTS_V6]:22 | ||
LISTS_HOST= | ||
LISTS_SSH_PORT=2222 | ||
LISTS_WEB_PORT=3000 | ||
LISTS_PROM_PORT=9222 | ||
LISTS_DOMAIN=lists.dev.pico.sh:3000 | ||
LISTS_EMAIL=[email protected] | ||
LISTS_SUBDOMAINS=1 | ||
LISTS_CUSTOMDOMAINS=1 | ||
LISTS_PROTOCOL=http | ||
LISTS_ALLOW_REGISTER=1 | ||
LISTS_DEBUG=1 | ||
|
||
PASTES_CADDYFILE=./caddy/Caddyfile | ||
PASTES_V4= | ||
PASTES_V6= | ||
|
@@ -62,11 +40,7 @@ PASTES_SSH_PORT=2222 | |
PASTES_WEB_PORT=3000 | ||
PASTES_PROM_PORT=9222 | ||
PASTES_DOMAIN=pastes.dev.pico.sh:3001 | ||
PASTES_EMAIL=[email protected] | ||
PASTES_SUBDOMAINS=1 | ||
PASTES_CUSTOMDOMAINS=1 | ||
PASTES_PROTOCOL=http | ||
PASTES_ALLOW_REGISTER=1 | ||
PASTES_DEBUG=1 | ||
|
||
PROSE_CADDYFILE=./caddy/Caddyfile | ||
|
@@ -83,11 +57,7 @@ PROSE_SSH_PORT=2222 | |
PROSE_WEB_PORT=3000 | ||
PROSE_PROM_PORT=9222 | ||
PROSE_DOMAIN=prose.dev.pico.sh:3002 | ||
PROSE_EMAIL=[email protected] | ||
PROSE_SUBDOMAINS=1 | ||
PROSE_CUSTOMDOMAINS=1 | ||
PROSE_PROTOCOL=http | ||
PROSE_ALLOW_REGISTER=1 | ||
PROSE_DEBUG=1 | ||
|
||
IMGS_CADDYFILE=./caddy/Caddyfile | ||
|
@@ -105,10 +75,7 @@ IMGS_WEB_PORT=3000 | |
IMGS_PROM_PORT=9222 | ||
IMGS_DOMAIN=imgs.dev.pico.sh:3003 | ||
IMGS_EMAIL=[email protected] | ||
IMGS_SUBDOMAINS=1 | ||
IMGS_CUSTOMDOMAINS=1 | ||
IMGS_PROTOCOL=http | ||
IMGS_ALLOW_REGISTER=1 | ||
IMGS_STORAGE_DIR=.storage | ||
IMGS_DEBUG=1 | ||
|
||
|
@@ -127,11 +94,7 @@ FEEDS_SSH_PORT=2222 | |
FEEDS_WEB_PORT=3000 | ||
FEEDS_PROM_PORT=9222 | ||
FEEDS_DOMAIN=feeds.dev.pico.sh:3004 | ||
FEEDS_EMAIL=[email protected] | ||
FEEDS_SUBDOMAINS=1 | ||
FEEDS_CUSTOMDOMAINS=1 | ||
FEEDS_PROTOCOL=http | ||
FEEDS_ALLOW_REGISTER=1 | ||
FEEDS_DEBUG=1 | ||
|
||
PGS_CADDYFILE=./caddy/Caddyfile | ||
|
@@ -148,11 +111,7 @@ PGS_SSH_PORT=2222 | |
PGS_WEB_PORT=3000 | ||
PGS_PROM_PORT=9222 | ||
PGS_DOMAIN=pgs.dev.pico.sh:3005 | ||
PGS_EMAIL=[email protected] | ||
PGS_SUBDOMAINS=1 | ||
PGS_CUSTOMDOMAINS=1 | ||
PGS_PROTOCOL=http | ||
PGS_ALLOW_REGISTER=1 | ||
PGS_STORAGE_DIR=.storage | ||
PGS_DEBUG=1 | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,52 +2,34 @@ package feeds | |
|
||
import ( | ||
"github.com/picosh/pico/shared" | ||
"github.com/picosh/pico/wish/cms/config" | ||
) | ||
|
||
func NewConfigSite() *shared.ConfigSite { | ||
debug := shared.GetEnv("FEEDS_DEBUG", "0") | ||
domain := shared.GetEnv("FEEDS_DOMAIN", "feeds.sh") | ||
email := shared.GetEnv("FEEDS_EMAIL", "[email protected]") | ||
subdomains := shared.GetEnv("FEEDS_SUBDOMAINS", "0") | ||
customdomains := shared.GetEnv("FEEDS_CUSTOMDOMAINS", "0") | ||
port := shared.GetEnv("FEEDS_WEB_PORT", "3000") | ||
protocol := shared.GetEnv("FEEDS_PROTOCOL", "https") | ||
allowRegister := shared.GetEnv("FEEDS_ALLOW_REGISTER", "1") | ||
storageDir := shared.GetEnv("IMGS_STORAGE_DIR", ".storage") | ||
minioURL := shared.GetEnv("MINIO_URL", "") | ||
minioUser := shared.GetEnv("MINIO_ROOT_USER", "") | ||
minioPass := shared.GetEnv("MINIO_ROOT_PASSWORD", "") | ||
dbURL := shared.GetEnv("DATABASE_URL", "") | ||
sendgridKey := shared.GetEnv("SENDGRID_API_KEY", "") | ||
useImgProxy := shared.GetEnv("USE_IMGPROXY", "1") | ||
|
||
intro := "To get started, enter a username.\n" | ||
intro += "To learn next steps go to our docs at https://pico.sh/feeds\n" | ||
|
||
return &shared.ConfigSite{ | ||
Debug: debug == "1", | ||
SubdomainsEnabled: subdomains == "1", | ||
CustomdomainsEnabled: customdomains == "1", | ||
UseImgProxy: useImgProxy == "1", | ||
SendgridKey: sendgridKey, | ||
ConfigCms: config.ConfigCms{ | ||
Domain: domain, | ||
Email: email, | ||
Port: port, | ||
Protocol: protocol, | ||
DbURL: dbURL, | ||
StorageDir: storageDir, | ||
MinioURL: minioURL, | ||
MinioUser: minioUser, | ||
MinioPass: minioPass, | ||
Description: "An rss-to-email digest service for hackers", | ||
IntroText: intro, | ||
Space: "feeds", | ||
AllowedExt: []string{".txt"}, | ||
HiddenPosts: []string{"_header.txt", "_readme.txt"}, | ||
Logger: shared.CreateLogger(debug == "1"), | ||
AllowRegister: allowRegister == "1", | ||
}, | ||
Debug: debug == "1", | ||
SendgridKey: sendgridKey, | ||
Domain: domain, | ||
Port: port, | ||
Protocol: protocol, | ||
DbURL: dbURL, | ||
StorageDir: storageDir, | ||
MinioURL: minioURL, | ||
MinioUser: minioUser, | ||
MinioPass: minioPass, | ||
Space: "feeds", | ||
AllowedExt: []string{".txt"}, | ||
HiddenPosts: []string{"_header.txt", "_readme.txt"}, | ||
Logger: shared.CreateLogger(debug == "1"), | ||
} | ||
} |
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.