Skip to content

Commit 5fdcd62

Browse files
authored
Merge branch 'thedevs-network:main' into main
2 parents 1c6b1a5 + c2f6c7f commit 5fdcd62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+550
-1346
lines changed

.example.env

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@ DEFAULT_DOMAIN=localhost:3000
1111
JWT_SECRET=
1212

1313
# Optional - Database client. Available clients for the supported databases:
14-
# pg | pg-native | sqlite3 | better-sqlite3 | mysql | mysql2 | oracledb | tedious
15-
DB_CLIENT=sqlite3
16-
# SQL database credential details, only if you use Postgres or MySQL
14+
# pg | better-sqlite3 | mysql2
15+
# other supported drivers that you can use but you have to manually install them with npm:
16+
# pg-native | sqlite3 | mysql
17+
DB_CLIENT=better-sqlite3
18+
19+
# Optional - SQLite database file path
20+
# Only if you're using SQLite
21+
DB_FILENAME=db/data
22+
23+
# Optional - SQL database credential details
24+
# Only if you're using Postgres or MySQL
1725
DB_HOST=localhost
1826
DB_PORT=5432
1927
DB_NAME=kutt
@@ -26,6 +34,15 @@ DB_POOL_MAX=10
2634
# Optional - Generated link length
2735
LINK_LENGTH=6
2836

37+
# Optional - Alphabet used to generate custom addresses
38+
# Default value omits o, O, 0, i, I, l, 1, and j to avoid confusion when reading the URL
39+
LINK_CUSTOM_ALPHABET=abcdefghkmnpqrstuvwxyzABCDEFGHKLMNPQRSTUVWXYZ23456789
40+
41+
# Optional - Tells the app that it's running behind a proxy server
42+
# and that it should get the IP address from that proxy server
43+
# if you're not using a proxy server then set this to false, otherwise users can override their IP address
44+
TRUST_PROXY=true
45+
2946
# Optional - Redis host and port
3047
REDIS_ENABLED=false
3148
REDIS_HOST=127.0.0.1
@@ -56,7 +73,7 @@ CUSTOM_DOMAIN_USE_HTTPS=false
5673
# More info on the configuration on http://nodemailer.com/.
5774
MAIL_ENABLED=false
5875
MAIL_HOST=
59-
MAIL_PORT=
76+
MAIL_PORT=587
6077
MAIL_SECURE=true
6178
MAIL_USER=
6279
MAIL_FROM=
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: docker-build-development
2+
3+
env:
4+
dockerhub_repository: "kutt/kutt"
5+
dockerhub_tag: "development"
6+
7+
on:
8+
push:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
dockerhub-build-push:
14+
runs-on: ubuntu-latest
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v2
19+
-
20+
name: Set up QEMU
21+
uses: docker/setup-qemu-action@v1
22+
-
23+
name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v1
25+
-
26+
name: Login to DockerHub
27+
uses: docker/login-action@v1
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
-
32+
name: Build and push
33+
uses: docker/build-push-action@v2
34+
with:
35+
platforms: linux/amd64,linux/arm64
36+
context: .
37+
push: true
38+
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}
39+
-
40+
name: Update repo description
41+
uses: peter-evans/dockerhub-description@v2
42+
with:
43+
username: ${{ secrets.DOCKERHUB_USERNAME }}
44+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
45+
repository: ${{ env.dockerhub_repository }}

.github/workflows/docker-build-latest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
name: Build and push
3333
uses: docker/build-push-action@v2
3434
with:
35+
platforms: linux/amd64,linux/arm64
3536
context: .
3637
push: true
3738
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}

.github/workflows/docker-build-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
name: Build and push
3131
uses: docker/build-push-action@v2
3232
with:
33+
platforms: linux/amd64,linux/arm64
3334
context: .
3435
push: true
3536
tags: ${{ env.dockerhub_repository }}:${{ github.event.release.tag_name }}, ${{ env.dockerhub_repository }}:latest

README.md

Lines changed: 108 additions & 33 deletions
Large diffs are not rendered by default.

custom/.gitkeep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# keep this folder in git
2+
# put supported customization files for styles and such
3+
# if you're using docker make sure to mount this folder

docker-compose.mariadb.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ services:
22
server:
33
build:
44
context: .
5+
volumes:
6+
- custom:/kutt/custom
57
environment:
68
DB_CLIENT: mysql2
79
DB_HOST: mariadb
10+
DB_PORT: 3306
811
REDIS_ENABLED: true
912
REDIS_HOST: redis
1013
REDIS_PORT: 6379
@@ -38,4 +41,5 @@ services:
3841
expose:
3942
- 6379
4043
volumes:
41-
db_data_mariadb:
44+
db_data_mariadb:
45+
custom:

docker-compose.postgres.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ services:
22
server:
33
build:
44
context: .
5+
volumes:
6+
- custom:/kutt/custom
57
environment:
68
DB_CLIENT: pg
79
DB_HOST: postgres
10+
DB_PORT: 5432
811
REDIS_ENABLED: true
912
REDIS_HOST: redis
1013
REDIS_PORT: 6379
@@ -37,4 +40,5 @@ services:
3740
expose:
3841
- 6379
3942
volumes:
40-
db_data_pg:
43+
db_data_pg:
44+
custom:

docker-compose.sqlite-redis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ services:
33
build:
44
context: .
55
volumes:
6-
- db-data:/var/lib/kutt
6+
- db_data_sqlite:/var/lib/kutt
7+
- custom:/kutt/custom
78
environment:
89
DB_FILENAME: "/var/lib/kutt/data.sqlite"
910
REDIS_ENABLED: true
@@ -20,4 +21,5 @@ services:
2021
expose:
2122
- 6379
2223
volumes:
23-
db-data:
24+
db_data_sqlite:
25+
custom:

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ services:
44
context: .
55
volumes:
66
- db_data_sqlite:/var/lib/kutt
7+
- custom:/kutt/custom
78
environment:
89
DB_FILENAME: "/var/lib/kutt/data.sqlite"
910
ports:
1011
- 3000:3000
1112
volumes:
12-
db_data_sqlite:
13+
db_data_sqlite:
14+
custom:

0 commit comments

Comments
 (0)