Skip to content

Commit 4cf05f0

Browse files
authored
Seafile with Let's Encrypt Using Docker Compose
1 parent 272b5e8 commit 4cf05f0

File tree

4 files changed

+199
-178
lines changed

4 files changed

+199
-178
lines changed

β€Ž.env

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Traefik Variables
2-
TRAEFIK_IMAGE_TAG=traefik:2.9
2+
TRAEFIK_IMAGE_TAG=traefik:3.2
3+
# Set the log level (DEBUG, INFO, WARN, ERROR)
34
TRAEFIK_LOG_LEVEL=WARN
4-
TRAEFIK_ACME_EMAIL=callvaldemar@gmail.com
5+
# The email address used by Let's Encrypt for renewal notices
6+
TRAEFIK_ACME_EMAIL=admin@example.com
7+
# The hostname used to access the Traefik dashboard and to configure domain-specific rules
58
TRAEFIK_HOSTNAME=traefik.seafile.heyvaldemar.net
69
# Basic Authentication for Traefik Dashboard
710
# Username: traefikadmin

β€Ž.github/workflows/00-deployment-verification.yml

+47-35
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,51 @@ jobs:
1212
deploy-and-test:
1313
runs-on: ubuntu-latest
1414

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
15+
env:
16+
NETWORK_ONE: seafile-network
17+
NETWORK_TWO: traefik-network
18+
DOCKER_COMPOSE_FILE: seafile-traefik-letsencrypt-docker-compose.yml
19+
APP_HOSTNAME: seafile.heyvaldemar.net
20+
APP_TRAEFIK_HOSTNAME: traefik.seafile.heyvaldemar.net
21+
COMPOSE_PROJECT_NAME: seafile
3422

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
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Create necessary Docker networks
28+
run: |
29+
docker network create $NETWORK_ONE || true
30+
docker network create $NETWORK_TWO || true
31+
32+
- name: Start up services using Docker Compose
33+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME up -d
34+
35+
- name: Modify /etc/hosts for internal routing
36+
run: |
37+
echo "127.0.0.1 $APP_HOSTNAME" | sudo tee -a /etc/hosts
38+
echo "127.0.0.1 $APP_TRAEFIK_HOSTNAME" | sudo tee -a /etc/hosts
39+
40+
- name: Print Docker Compose services status
41+
run: docker ps
42+
43+
- name: Wait for the application to be ready via Traefik
44+
run: |
45+
echo "Checking the routing and availability of the application via Traefik..."
46+
timeout 5m bash -c 'while ! curl -fsSLk "https://$APP_HOSTNAME"; do \
47+
echo "Waiting for the application to be ready..."; \
48+
sleep 10; \
49+
done'
50+
51+
- name: Inspect Network Configuration
52+
run: |
53+
docker network inspect $NETWORK_ONE
54+
docker network inspect $NETWORK_TWO
55+
56+
- name: Show container logs on failure
57+
if: failure()
58+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME logs
59+
60+
- name: Shutdown Docker Compose services
61+
if: always()
62+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME down

β€ŽREADME.md

+77-26
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Deploy Seafile using Docker Compose:
2222

2323
`docker compose -f seafile-traefik-letsencrypt-docker-compose.yml -p seafile up -d`
2424

25-
# Fixing CSRF Verification Error (403 Forbidden) in Seafile
25+
## Fixing CSRF Verification Error (403 Forbidden) in Seafile
2626

2727
If you encounter a `403 Forbidden - CSRF verification failed` error when logging into Seafile, follow these steps to add your domain to the trusted origins and set the correct URL for the file server.
2828

@@ -46,7 +46,7 @@ This command will:
4646

4747
After running the command, try logging in again.
4848

49-
# Backups
49+
## Backups
5050

5151
The `backups` container in the configuration is responsible for the following:
5252

@@ -59,7 +59,7 @@ Customizable backup path, filename pattern, and schedule through variables like
5959

6060
By utilizing this container, consistent and automated backups of the essential components of your instance are ensured. Moreover, efficient management of backup storage and tailored backup routines can be achieved through easy and flexible configuration using environment variables.
6161

62-
# seafile-restore-database.sh Description
62+
## seafile-restore-database.sh Description
6363

6464
This script facilitates the restoration of a database backup:
6565

@@ -81,7 +81,7 @@ To make the `seafile-restore-database.shh` script executable, run the following
8181

8282
Usage of this script ensures a controlled and guided process to restore the database from an existing backup.
8383

84-
# seafile-restore-application-data.sh Description
84+
## seafile-restore-application-data.sh Description
8585

8686
This script is designed to restore the application data:
8787

@@ -103,31 +103,82 @@ To make the `seafile-restore-application-data.sh` script executable, run the fol
103103

104104
By utilizing this script, you can efficiently restore application data from an existing backup while ensuring proper coordination with the running service.
105105

106-
# Author
106+
## Author
107107

108-
I’m Vladimir Mikhalev, the [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), but my friends can call me Valdemar.
108+
hey everyone,
109109

110-
🌐 My [website](https://www.heyvaldemar.com/) with detailed IT guides\
111-
🎬 Follow me on [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
112-
🐦 Follow me on [Twitter](https://twitter.com/heyValdemar)\
113-
🎨 Follow me on [Instagram](https://www.instagram.com/heyvaldemar/)\
114-
🧡 Follow me on [Threads](https://www.threads.net/@heyvaldemar)\
115-
🐘 Follow me on [Mastodon](https://mastodon.social/@heyvaldemar)\
116-
🧊 Follow me on [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
117-
🎸 Follow me on [Facebook](https://www.facebook.com/heyValdemarFB/)\
118-
πŸŽ₯ Follow me on [TikTok](https://www.tiktok.com/@heyvaldemar)\
119-
πŸ’» Follow me on [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
120-
🐈 Follow me on [GitHub](https://github.com/heyvaldemar)
110+
πŸ’Ύ I’ve been in the IT game for over 20 years, cutting my teeth with some big names like [IBM](https://www.linkedin.com/in/heyvaldemar/), [Thales](https://www.linkedin.com/in/heyvaldemar/), and [Amazon](https://www.linkedin.com/in/heyvaldemar/). These days, I wear the hat of a DevOps Consultant and Team Lead, but what really gets me going is Docker and container technology - I’m kind of obsessed!
121111

122-
# Communication
112+
πŸ’› I have my own IT [blog](https://www.heyvaldemar.com/), where I’ve built a [community](https://discord.gg/AJQGCCBcqf) of DevOps enthusiasts who share my love for all things Docker, containers, and IT technologies in general. And to make sure everyone can jump on this awesome DevOps train, I write super detailed guides (seriously, they’re foolproof!) that help even newbies deploy and manage complex IT solutions.
123113

124-
πŸ‘Ύ Chat with IT pros on [Discord](https://discord.gg/AJQGCCBcqf)\
125-
πŸ“§ Reach me at ask@sre.gg
114+
πŸš€ My dream is to empower every single person in the DevOps community to squeeze every last drop of potential out of Docker and container tech.
126115

127-
# Give Thanks
116+
🐳 As a [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), I’m stoked to share my knowledge, experiences, and a good dose of passion for the tech. My aim is to encourage learning, innovation, and growth, and to inspire the next generation of IT whizz-kids to push Docker and container tech to its limits.
128117

129-
πŸ’Ž Support on [GitHub](https://github.com/sponsors/heyValdemar)\
130-
πŸ† Support on [Patreon](https://www.patreon.com/heyValdemar)\
131-
πŸ₯€ Support on [BuyMeaCoffee](https://www.buymeacoffee.com/heyValdemar)\
132-
πŸͺ Support on [Ko-fi](https://ko-fi.com/heyValdemar)\
133-
πŸ’– Support on [PayPal](https://www.paypal.com/paypalme/heyValdemarCOM)
118+
Let’s do this together!
119+
120+
## My 2D Portfolio
121+
122+
πŸ•ΉοΈ Click into [sre.gg](https://www.sre.gg/) β€” my virtual space is a 2D pixel-art portfolio inviting you to interact with elements that encapsulate the milestones of my DevOps career.
123+
124+
## My Courses
125+
126+
πŸŽ“ Dive into my [comprehensive IT courses](https://www.heyvaldemar.com/courses/) designed for enthusiasts and professionals alike. Whether you're looking to master Docker, conquer Kubernetes, or advance your DevOps skills, my courses provide a structured pathway to enhancing your technical prowess.
127+
128+
πŸ”‘ [Each course](https://www.udemy.com/user/heyvaldemar/) is built from the ground up with real-world scenarios in mind, ensuring that you gain practical knowledge and hands-on experience. From beginners to seasoned professionals, there's something here for everyone to elevate their IT skills.
129+
130+
## My Services
131+
132+
πŸ’Ό Take a look at my [service catalog](https://www.heyvaldemar.com/services/) and find out how we can make your technological life better. Whether it's increasing the efficiency of your IT infrastructure, advancing your career, or expanding your technological horizons β€” I'm here to help you achieve your goals. From DevOps transformations to building gaming computers β€” let's make your technology unparalleled!
133+
134+
## Patreon Exclusives
135+
136+
πŸ† Join my [Patreon](https://www.patreon.com/heyvaldemar) and dive deep into the world of Docker and DevOps with exclusive content tailored for IT enthusiasts and professionals. As your experienced guide, I offer a range of membership tiers designed to suit everyone from newbies to IT experts.
137+
138+
## My Recommendations
139+
140+
πŸ“• Check out my collection of [essential DevOps books](https://kit.co/heyvaldemar/essential-devops-books)\
141+
πŸ–₯️ Check out my [studio streaming and recording kit](https://kit.co/heyvaldemar/my-studio-streaming-and-recording-kit)\
142+
πŸ“‘ Check out my [streaming starter kit](https://kit.co/heyvaldemar/streaming-starter-kit)
143+
144+
## Follow Me
145+
146+
🎬 [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
147+
🐦 [X / Twitter](https://twitter.com/heyvaldemar)\
148+
🎨 [Instagram](https://www.instagram.com/heyvaldemar/)\
149+
🐘 [Mastodon](https://mastodon.social/@heyvaldemar)\
150+
🧡 [Threads](https://www.threads.net/@heyvaldemar)\
151+
🎸 [Facebook](https://www.facebook.com/heyvaldemarFB/)\
152+
🧊 [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
153+
πŸŽ₯ [TikTok](https://www.tiktok.com/@heyvaldemar)\
154+
πŸ’» [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
155+
πŸ“£ [daily.dev Squad](https://app.daily.dev/squads/devopscompass)\
156+
🧩 [LeetCode](https://leetcode.com/u/heyvaldemar/)\
157+
🐈 [GitHub](https://github.com/heyvaldemar)
158+
159+
## Community of IT Experts
160+
161+
πŸ‘Ύ [Discord](https://discord.gg/AJQGCCBcqf)
162+
163+
## Refill My Coffee Supplies
164+
165+
πŸ’– [PayPal](https://www.paypal.com/paypalme/heyvaldemarCOM)\
166+
πŸ† [Patreon](https://www.patreon.com/heyvaldemar)\
167+
πŸ’Ž [GitHub](https://github.com/sponsors/heyvaldemar)\
168+
πŸ₯€ [BuyMeaCoffee](https://www.buymeacoffee.com/heyvaldemar)\
169+
πŸͺ [Ko-fi](https://ko-fi.com/heyvaldemar)
170+
171+
🌟 **Bitcoin (BTC):** bc1q2fq0k2lvdythdrj4ep20metjwnjuf7wccpckxc\
172+
πŸ”Ή **Ethereum (ETH):** 0x76C936F9366Fad39769CA5285b0Af1d975adacB8\
173+
πŸͺ™ **Binance Coin (BNB):** bnb1xnn6gg63lr2dgufngfr0lkq39kz8qltjt2v2g6\
174+
πŸ’  **Litecoin (LTC):** LMGrhx8Jsx73h1pWY9FE8GB46nBytjvz8g
175+
176+
<div align="center">
177+
178+
### Show some πŸ’œ by starring some of the [repositories](https://github.com/heyValdemar?tab=repositories)!
179+
180+
![octocat](https://user-images.githubusercontent.com/10498744/210113490-e2fad07f-4488-4da8-a656-b9abbdd8cb26.gif)
181+
182+
</div>
183+
184+
![footer](https://user-images.githubusercontent.com/10498744/210157572-1fca0242-8af2-46a6-bfa3-666ffd40ebde.svg)

0 commit comments

Comments
Β (0)