-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
134 additions
and
3 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
*.env |
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,70 @@ | ||
# app custom Makefile | ||
|
||
# Docker repo & image name without version | ||
IMAGE ?= superseriousbusiness/gotosocial | ||
# Hostname for external access | ||
APP_SITE ?= fedi.dev.lan | ||
# App names (db/user name etc) | ||
APP_NAME ?= gts | ||
|
||
# PgSQL used as DB | ||
USE_DB = yes | ||
|
||
# Sample admin user data | ||
ADD_USER = yes | ||
|
||
# ------------------------------------------------------------------------------ | ||
# app custom config | ||
|
||
IMAGE_VER ?= latest | ||
|
||
DCAPE_ROOT ?= /opt/dcape/var | ||
|
||
DATA_PATH ?= $(APP_NAME) | ||
|
||
DCAPE_GTS_UID ?= 1000 | ||
DCAPE_GTS_GID ?= 1000 | ||
|
||
CONTAINER_ID ?= $(APP_TAG)_app_1 | ||
|
||
# ------------------------------------------------------------------------------ | ||
# .env template (custom part) | ||
# inserted in .env.sample via 'make config' | ||
define CONFIG_CUSTOM | ||
# ------------------------------------------------------------------------------ | ||
# app custom config, generated by make config | ||
# db:$(USE_DB) user:$(ADD_USER) | ||
|
||
# Path to /opt/dcape/var. Used only outside drone | ||
DCAPE_ROOT=$(DCAPE_ROOT) | ||
|
||
DATA_PATH=$(DATA_PATH) | ||
|
||
endef | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Find and include DCAPE/apps/drone/dcape-app/Makefile | ||
DCAPE_COMPOSE ?= dcape-compose | ||
DCAPE_MAKEFILE ?= $(shell docker inspect -f "{{.Config.Labels.dcape_app_makefile}}" $(DCAPE_COMPOSE)) | ||
ifeq ($(shell test -e $(DCAPE_MAKEFILE) && echo -n yes),yes) | ||
include $(DCAPE_MAKEFILE) | ||
else | ||
include /opt/dcape-app/Makefile | ||
endif | ||
|
||
|
||
## create user | ||
user-add: | ||
@docker exec -it $(CONTAINER_ID) /gotosocial/gotosocial admin account create \ | ||
--username $(USER_NAME) \ | ||
--email $(USER_EMAIL) \ | ||
--password '$(USER_PASS)' | ||
|
||
## promote user to admin | ||
user-admin: | ||
@docker exec -it $(CONTAINER_ID) /gotosocial/gotosocial admin account promote --username $(USER_NAME) | ||
|
||
## create file storage with perms | ||
storage: | ||
@path=$(DCAPE_ROOT)/$(DATA_PATH) ; \ | ||
[ -d $$path ] || sudo install -o $(DCAPE_GTS_UID) -g $(DCAPE_GTS_GID) -d $$path |
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,2 +1,38 @@ | ||
# dcape-app-gotosocial | ||
GoToSocial application package for dcape | ||
# dcape-app-GoToSocial | ||
|
||
[![GitHub Release][1]][2] [![GitHub code size in bytes][3]]() [![GitHub license][4]][5] | ||
|
||
[1]: https://img.shields.io/github/release/dopos/dcape-app-gotosocial.svg | ||
[2]: https://github.com/dopos/dcape-app-gotosocial/releases | ||
[3]: https://img.shields.io/github/languages/code-size/dopos/dcape-app-gotosocial.svg | ||
[4]: https://img.shields.io/github/license/dopos/dcape-app-gotosocial.svg | ||
[5]: LICENSE | ||
|
||
[GoToSocial](https://gotosocial.org/) application package for [dcape](https://github.com/dopos/dcape). | ||
|
||
## Docker image used | ||
|
||
* [gotosocial/gotosocial](https://hub.docker.com/r/superseriousbusiness/gotosocial/) | ||
|
||
## Requirements | ||
|
||
* linux 64bit (git, make, wget, gawk, openssl) | ||
* [docker](http://docker.io) | ||
* [dcape](https://github.com/dopos/dcape) | ||
* Git service ([github](https://github.com), [gitea](https://gitea.io) or [gogs](https://gogs.io)) | ||
|
||
## Usage | ||
|
||
* Fork this repo in your Git service | ||
* Setup deploy hook | ||
* Run "Test delivery" (config sample will be created in dcape) | ||
* Edit and save config (enable deploy etc) | ||
* Run "Test delivery" again (app will be installed and started on webhook host) | ||
|
||
See also: [Deploy setup](https://github.com/dopos/dcape/blob/master/DEPLOY.md) (in Russian) | ||
|
||
## License | ||
|
||
The MIT License (MIT), see [LICENSE](LICENSE). | ||
|
||
Copyright (c) 2023 Alexey Kovrizhkin <[email protected]> |
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,24 @@ | ||
# custom app config | ||
# overrides DCAPE/apps/drone/dcape-app/docker-compose.yml | ||
|
||
version: '2' | ||
|
||
services: | ||
app: | ||
labels: | ||
- traefik.http.services.${APP_TAG}.loadbalancer.server.port=8080 | ||
environment: | ||
- GTS_HOST=${APP_SITE} | ||
- GTS_DB_TYPE=postgres | ||
- GTS_DB_ADDRESS=db | ||
- GTS_DB_DATABASE=${PGDATABASE} | ||
- GTS_DB_USER=${PGUSER} | ||
- GTS_DB_PASSWORD=${PGPASSWORD} | ||
- GTS_DB_TLS_MODE=false | ||
- GTS_LETSENCRYPT_ENABLED=false | ||
- GTS_PROTOCOL=http | ||
## For reverse proxy setups: | ||
# GTS_TRUSTED_PROXIES: "172.x.x.x" | ||
volumes: | ||
- ${DCAPE_ROOT}/${DATA_PATH}:/gotosocial/storage | ||
|