-
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
6 changed files
with
161 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
|
||
# lint this file | ||
# go install github.com/woodpecker-ci/woodpecker/cmd/cli@latest | ||
# cli lint .woodpecker.yml | ||
|
||
variables: | ||
- &dcape_img 'dcape-compose' | ||
|
||
clone: | ||
git: | ||
image: woodpeckerci/plugin-git | ||
settings: | ||
lfs: false | ||
tags: false | ||
|
||
steps: | ||
deploy: | ||
image: *dcape_img | ||
commands: | ||
- make .default-deploy | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock |
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,60 +1,68 @@ | ||
# app custom Makefile | ||
## dcape-app-template Makefile | ||
## This file extends Makefile.app from dcape | ||
#: | ||
|
||
APP_NAME ?= coturn | ||
SHELL = /bin/bash | ||
CFG ?= .env | ||
CFG_BAK ?= $(CFG).bak | ||
|
||
# The domain name of this homeserver. | ||
APP_DOMAIN ?= dev.lan | ||
|
||
# Hostname for external access | ||
APP_SITE ?= coturn.dev.lan | ||
#- App name | ||
APP_NAME ?= coturn | ||
|
||
# Docker repo & image name without version | ||
IMAGE ?= ghcr.io/coturn/coturn | ||
#- Docker image name | ||
IMAGE ?= ghcr.io/coturn/coturn | ||
|
||
#USE_TLS = yes | ||
#- Docker image tag | ||
IMAGE_VER ?= 4.6.2-alpine | ||
|
||
# ------------------------------------------------------------------------------ | ||
# app custom config | ||
# The domain name of this homeserver. | ||
APP_DOMAIN ?= dev.test | ||
|
||
IMAGE_VER ?= 4.6.1-alpine | ||
# Hostname for external access | ||
APP_SITE ?= coturn.$(APP_DOMAIN) | ||
|
||
#EXTERNAL_IP ?= $(shell docker run --rm $(IMAGE):$(IMAGE_VER) detect-external-ip) | ||
|
||
#- STATIC_AUTH_SECRET | ||
STATIC_AUTH_SECRET ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 | head -c14; echo) | ||
|
||
#- CLI_SECRET | ||
CLI_SECRET ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 | head -c14; echo) | ||
|
||
#- UDP min port | ||
MIN_PORT = 49152 | ||
#- UDP max port | ||
MAX_PORT = 49200 | ||
|
||
USE_DB = yes | ||
DB_INIT_SQL = schema.sql | ||
# ------------------------------------------------------------------------------ | ||
# .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) | ||
|
||
|
||
#EXTERNAL_IP=$(EXTERNAL_IP) | ||
STATIC_AUTH_SECRET=$(STATIC_AUTH_SECRET) | ||
CLI_SECRET=$(CLI_SECRET) | ||
# if exists - load old values | ||
-include $(CFG_BAK) | ||
export | ||
|
||
MIN_PORT=$(MIN_PORT) | ||
MAX_PORT=$(MAX_PORT) | ||
-include $(CFG) | ||
export | ||
|
||
# Path to /opt/dcape/var. Used only outside drone | ||
DCAPE_ROOT=$(DCAPE_ROOT) | ||
|
||
endef | ||
DB_ADMIN_USER ?= $(PGUSER) | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Find and include DCAPE/apps/drone/dcape-app/Makefile | ||
# Find and include DCAPE_ROOT/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) | ||
DCAPE_ROOT ?= $(shell docker inspect -f "{{.Config.Labels.dcape_root}}" $(DCAPE_COMPOSE)) | ||
|
||
ifeq ($(shell test -e $(DCAPE_ROOT)/Makefile.app && echo -n yes),yes) | ||
include $(DCAPE_ROOT)/Makefile.app | ||
else | ||
include /opt/dcape-app/Makefile | ||
include /opt/dcape/Makefile.app | ||
endif | ||
|
||
ext-ip: | ||
@echo $(EXTERNAL_IP) | ||
# ------------------------------------------------------------------------------ | ||
|
||
## Cals and show external ip | ||
ext-ip: CMD=exec app detect-external-ip | ||
ext-ip: dc | ||
|
||
cli: CMD=exec app bash | ||
cli: dc |
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,60 @@ | ||
/* | ||
Code from: | ||
https://raw.githubusercontent.com/coturn/coturn/master/docker/postgresql/schema.sql | ||
or https://github.com/coturn/coturn/blob/master/turndb/schema.sql | ||
*/ | ||
|
||
CREATE TABLE turnusers_lt ( | ||
realm varchar(127) default '', | ||
name varchar(512), | ||
hmackey char(128), | ||
PRIMARY KEY (realm,name) | ||
); | ||
|
||
CREATE TABLE turn_secret ( | ||
realm varchar(127) default '', | ||
value varchar(256), | ||
primary key (realm,value) | ||
); | ||
|
||
CREATE TABLE allowed_peer_ip ( | ||
realm varchar(127) default '', | ||
ip_range varchar(256), | ||
primary key (realm,ip_range) | ||
); | ||
|
||
CREATE TABLE denied_peer_ip ( | ||
realm varchar(127) default '', | ||
ip_range varchar(256), | ||
primary key (realm,ip_range) | ||
); | ||
|
||
CREATE TABLE turn_origin_to_realm ( | ||
origin varchar(127), | ||
realm varchar(127), | ||
primary key (origin) | ||
); | ||
|
||
CREATE TABLE turn_realm_option ( | ||
realm varchar(127) default '', | ||
opt varchar(32), | ||
value varchar(128), | ||
primary key (realm,opt) | ||
); | ||
|
||
CREATE TABLE oauth_key ( | ||
kid varchar(128), | ||
ikm_key varchar(256), | ||
timestamp bigint default 0, | ||
lifetime integer default 0, | ||
as_rs_alg varchar(64) default '', | ||
realm varchar(127), | ||
primary key (kid) | ||
); | ||
|
||
CREATE TABLE admin_user ( | ||
name varchar(32), | ||
realm varchar(127), | ||
password varchar(127), | ||
primary key (name) | ||
); |