Skip to content

Commit 272b5e8

Browse files
committed
Seafile with Let's Encrypt Using Docker Compose
0 parents  commit 272b5e8

8 files changed

+884
-0
lines changed

.env

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Traefik Variables
2+
TRAEFIK_IMAGE_TAG=traefik:2.9
3+
TRAEFIK_LOG_LEVEL=WARN
4+
TRAEFIK_ACME_EMAIL=callvaldemar@gmail.com
5+
TRAEFIK_HOSTNAME=traefik.seafile.heyvaldemar.net
6+
# Basic Authentication for Traefik Dashboard
7+
# Username: traefikadmin
8+
# Passwords must be encoded using MD5, SHA1, or BCrypt https://hostingcanada.org/htpasswd-generator/
9+
TRAEFIK_BASIC_AUTH=traefikadmin:$$2y$$10$$sMzJfirKC75x/hVpiINeZOiSm.Jkity9cn4KwNkRvO7hSQVFc5FLO
10+
11+
# Seafile Variables
12+
SEAFILE_MARIADB_IMAGE_TAG=mariadb:11.1
13+
SEAFILE_IMAGE_TAG=h44z/seafile-ce:11.0.11
14+
SEAFILE_MEMCACHE_IMAGE_TAG=memcached:1.6.25-alpine
15+
SEAFILE_DB_USER=seafiledbbuser
16+
SEAFILE_DB_PASSWORD=DH8MowfpuwGyBfNcnafE
17+
SEAFILE_DB_ADMIN_PASSWORD=MFfmVC4uJLyXVrjBwEDp
18+
SEAFILE_SITE_NAME=Seafile
19+
SEAFILE_ADMIN_USERNAME=seafileadmin@heyvaldemar.net
20+
SEAFILE_ADMIN_PASSWORD=AdgTrAOJrqh78n713RsD
21+
SEAFILE_HOSTNAME=seafile.heyvaldemar.net
22+
# Timezone inside container
23+
# A list of these tz database names can be looked up at Wikipedia
24+
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
25+
SEAFILE_TIMEZONE=America/New_York
26+
27+
# Backup Variables
28+
BACKUP_INIT_SLEEP=1m
29+
BACKUP_INTERVAL=1m
30+
MARIADB_BACKUP_PRUNE_DAYS=7
31+
DATA_BACKUP_PRUNE_DAYS=7
32+
MARIADB_BACKUPS_PATH=/srv/seafile-mariadb/backups
33+
DATA_BACKUPS_PATH=/srv/seafile-application-data/backups
34+
DATA_PATH=/seafile
35+
MARIADB_BACKUP_NAME=seafile-mariadb-backup
36+
DATA_BACKUP_NAME=seafile-application-data-backup

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github: heyvaldemar
2+
patreon: heyvaldemar
3+
ko_fi: heyvaldemar
4+
custom: ['paypal.com/paypalme/heyValdemarCOM', 'buymeacoffee.com/heyValdemar', 'ko-fi.com/heyValdemar']
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deployment Verification
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
deploy-and-test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Create necessary Docker networks
23+
run: |
24+
docker network create seafile-network || true
25+
docker network create traefik-network || true
26+
27+
- name: Start up services using Docker Compose
28+
run: docker compose -f seafile-traefik-letsencrypt-docker-compose.yml up -d
29+
30+
- name: Modify /etc/hosts for internal routing
31+
run: |
32+
echo "127.0.0.1 seafile.heyvaldemar.net" | sudo tee -a /etc/hosts
33+
echo "127.0.0.1 traefik.seafile.heyvaldemar.net" | sudo tee -a /etc/hosts
34+
35+
- name: Print Docker Compose services status
36+
run: docker ps
37+
38+
- name: Wait for the application to be ready via Traefik
39+
run: |
40+
echo "Checking the routing and availability of application via Traefik..."
41+
timeout 5m bash -c 'while ! curl -fsSLk "https://seafile.heyvaldemar.net"; do echo "Waiting for the application to be ready..."; sleep 10; done'
42+
43+
- name: Inspect Network Configuration
44+
run: |
45+
docker network inspect seafile-network
46+
docker network inspect traefik-network
47+
48+
- name: Shutdown Docker Compose services
49+
if: always()
50+
run: docker compose -f seafile-traefik-letsencrypt-docker-compose.yml down

.gitignore

+284
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/git,macos,xcode,jekyll,packer,ansible,vagrant,windows,notepadpp,terraform,powershell,terragrunt,sublimetext,ansibletower,visualstudiocode,linux
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=git,macos,xcode,jekyll,packer,ansible,vagrant,windows,notepadpp,terraform,powershell,terragrunt,sublimetext,ansibletower,visualstudiocode,linux
3+
4+
### Ansible ###
5+
*.retry
6+
7+
### AnsibleTower ###
8+
# Ansible runtime and backups
9+
*.original
10+
*.tmp
11+
*.bkp
12+
*.*~
13+
14+
# Tower runtime roles
15+
roles/**
16+
!roles/requirements.yml
17+
18+
# Avoid plain-text passwords
19+
*pwd*
20+
*pass*
21+
*password*
22+
*.txt
23+
24+
# Exclude all binaries
25+
*.bin
26+
*.jar
27+
*.tar
28+
*.zip
29+
*.gzip
30+
*.tgz
31+
32+
33+
### Git ###
34+
# Created by git for backups. To disable backups in Git:
35+
# $ git config --global mergetool.keepBackup false
36+
*.orig
37+
38+
# Created by git when using merge tools for conflicts
39+
*.BACKUP.*
40+
*.BASE.*
41+
*.LOCAL.*
42+
*.REMOTE.*
43+
*_BACKUP_*.txt
44+
*_BASE_*.txt
45+
*_LOCAL_*.txt
46+
*_REMOTE_*.txt
47+
48+
### Jekyll ###
49+
_site/
50+
.sass-cache/
51+
.jekyll-cache/
52+
.jekyll-metadata
53+
# Ignore folders generated by Bundler
54+
.bundle/
55+
vendor/
56+
57+
### Linux ###
58+
*~
59+
60+
# temporary files which can be created if a process still has a handle open of a deleted file
61+
.fuse_hidden*
62+
63+
# KDE directory preferences
64+
.directory
65+
66+
# Linux trash folder which might appear on any partition or disk
67+
.Trash-*
68+
69+
# .nfs files are created when an open file is removed but is still being accessed
70+
.nfs*
71+
72+
### macOS ###
73+
# General
74+
.DS_Store
75+
.AppleDouble
76+
.LSOverride
77+
78+
# Icon must end with two \r
79+
Icon
80+
81+
82+
# Thumbnails
83+
._*
84+
85+
# Files that might appear in the root of a volume
86+
.DocumentRevisions-V100
87+
.fseventsd
88+
.Spotlight-V100
89+
.TemporaryItems
90+
.Trashes
91+
.VolumeIcon.icns
92+
.com.apple.timemachine.donotpresent
93+
94+
# Directories potentially created on remote AFP share
95+
.AppleDB
96+
.AppleDesktop
97+
Network Trash Folder
98+
Temporary Items
99+
.apdisk
100+
101+
### macOS Patch ###
102+
# iCloud generated files
103+
*.icloud
104+
105+
### NotepadPP ###
106+
# Notepad++ backups #
107+
*.bak
108+
109+
### Packer ###
110+
# Cache objects
111+
packer_cache/
112+
113+
# Crash log
114+
crash.log
115+
116+
# https://www.packer.io/guides/hcl/variables
117+
# Exclude all .pkrvars.hcl files, which are likely to contain sensitive data,
118+
# such as password, private keys, and other secrets. These should not be part of
119+
# version control as they are data points which are potentially sensitive and
120+
# subject to change depending on the environment.
121+
#
122+
*.pkrvars.hcl
123+
124+
# For built boxes
125+
*.box
126+
127+
### Packer Patch ###
128+
# ignore temporary output files
129+
output-*/
130+
131+
### PowerShell ###
132+
# Exclude packaged modules
133+
134+
# Exclude .NET assemblies from source
135+
*.dll
136+
137+
### SublimeText ###
138+
# Cache files for Sublime Text
139+
*.tmlanguage.cache
140+
*.tmPreferences.cache
141+
*.stTheme.cache
142+
143+
# Workspace files are user-specific
144+
*.sublime-workspace
145+
146+
# Project files should be checked into the repository, unless a significant
147+
# proportion of contributors will probably not be using Sublime Text
148+
# *.sublime-project
149+
150+
# SFTP configuration file
151+
sftp-config.json
152+
sftp-config-alt*.json
153+
154+
# Package control specific files
155+
Package Control.last-run
156+
Package Control.ca-list
157+
Package Control.ca-bundle
158+
Package Control.system-ca-bundle
159+
Package Control.cache/
160+
Package Control.ca-certs/
161+
Package Control.merged-ca-bundle
162+
Package Control.user-ca-bundle
163+
oscrypto-ca-bundle.crt
164+
bh_unicode_properties.cache
165+
166+
# Sublime-github package stores a github token in this file
167+
# https://packagecontrol.io/packages/sublime-github
168+
GitHub.sublime-settings
169+
170+
### Terraform ###
171+
# Local .terraform directories
172+
**/.terraform/*
173+
174+
# .tfstate files
175+
*.tfstate
176+
*.tfstate.*
177+
178+
# Crash log files
179+
crash.*.log
180+
181+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
182+
# password, private keys, and other secrets. These should not be part of version
183+
# control as they are data points which are potentially sensitive and subject
184+
# to change depending on the environment.
185+
*.tfvars
186+
*.tfvars.json
187+
188+
# Ignore override files as they are usually used to override resources locally and so
189+
# are not checked in
190+
override.tf
191+
override.tf.json
192+
*_override.tf
193+
*_override.tf.json
194+
195+
# Include override files you do wish to add to version control using negated pattern
196+
# !example_override.tf
197+
198+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
199+
# example: *tfplan*
200+
201+
# Ignore CLI configuration files
202+
.terraformrc
203+
terraform.rc
204+
205+
### Terragrunt ###
206+
# terragrunt cache directories
207+
**/.terragrunt-cache/*
208+
209+
# Terragrunt debug output file (when using `--terragrunt-debug` option)
210+
# See: https://terragrunt.gruntwork.io/docs/reference/cli-options/#terragrunt-debug
211+
terragrunt-debug.tfvars.json
212+
213+
### Vagrant ###
214+
# General
215+
.vagrant/
216+
217+
# Log files (if you are creating logs in debug mode, uncomment this)
218+
# *.log
219+
220+
### Vagrant Patch ###
221+
222+
### VisualStudioCode ###
223+
.vscode/*
224+
!.vscode/settings.json
225+
!.vscode/tasks.json
226+
!.vscode/launch.json
227+
!.vscode/extensions.json
228+
!.vscode/*.code-snippets
229+
230+
# Local History for Visual Studio Code
231+
.history/
232+
233+
# Built Visual Studio Code Extensions
234+
*.vsix
235+
236+
### VisualStudioCode Patch ###
237+
# Ignore all local history of files
238+
.history
239+
.ionide
240+
241+
### Windows ###
242+
# Windows thumbnail cache files
243+
Thumbs.db
244+
Thumbs.db:encryptable
245+
ehthumbs.db
246+
ehthumbs_vista.db
247+
248+
# Dump file
249+
*.stackdump
250+
251+
# Folder config file
252+
[Dd]esktop.ini
253+
254+
# Recycle Bin used on file shares
255+
$RECYCLE.BIN/
256+
257+
# Windows Installer files
258+
*.cab
259+
*.msi
260+
*.msix
261+
*.msm
262+
*.msp
263+
264+
# Windows shortcuts
265+
*.lnk
266+
267+
### Xcode ###
268+
## User settings
269+
xcuserdata/
270+
271+
## Xcode 8 and earlier
272+
*.xcscmblueprint
273+
*.xccheckout
274+
275+
### Xcode Patch ###
276+
*.xcodeproj/*
277+
!*.xcodeproj/project.pbxproj
278+
!*.xcodeproj/xcshareddata/
279+
!*.xcodeproj/project.xcworkspace/
280+
!*.xcworkspace/contents.xcworkspacedata
281+
/*.gcno
282+
**/xcshareddata/WorkspaceSettings.xcsettings
283+
284+
# End of https://www.toptal.com/developers/gitignore/api/git,macos,xcode,jekyll,packer,ansible,vagrant,windows,notepadpp,terraform,powershell,terragrunt,sublimetext,ansibletower,visualstudiocode,linux

0 commit comments

Comments
 (0)