The ProjectSend application, developed by LinuxServer.io, serves as a powerful file-sharing solution. However, it does not include built-in database configuration options. Users might consider setting up a separate database instance to support ProjectSend alongside other services, but this may not be the best choice for those looking for a fully integrated, turnkey Docker deployment.
Fortunately, there’s an effective workaround. By adding a dedicated database container to the Docker Compose configuration, you can establish a complete application stack without relying on external database management.
In this setup, I’ve integrated a MariaDB database container into the Docker Compose file. This addition streamlines deployment and ensures that each Docker Compose configuration delivers a fully operational application with all necessary components. Although this method may require slightly more resources (in terms of memory and CPU), it aligns with my preference for self-contained and easily recoverable application stacks.
To enhance the ProjectSend deployment further, I’ve included several Traefik labels. These labels facilitate HTTPS termination, allowing secure access to the application via a URL like https://shares.yourdomain.com. This setup assumes that Traefik is correctly configured and running, along with a Docker network named “web” to enable communication between containers.
labels:
- traefik.enable=true
- traefik.http.routers.projectsend.rule=Host(`shares.yourdomain.com`)
- traefik.http.routers.projectsend.service=projectsend
- traefik.http.routers.projectsend.entrypoints=websecure
- traefik.http.services.projectsend.loadbalancer.server.port=80
- traefik.http.routers.projectsend.tls=true
- traefik.http.routers.projectsend.tls.certresolver=myresolver
- traefik.docker.network=web
When deploying this stack, keep the following key considerations in mind:
- Ensure that the database connection details (such as container name and credentials) are accurately configured to meet ProjectSend’s requirements.
- Confirm that the application’s base URL is set to the HTTPS address, as ProjectSend defaults to HTTP.
- For email configuration, use a Gmail account with an app-specific password for reliable email delivery.
By adhering to these guidelines, you can successfully deploy a self-contained, HTTPS-enabled ProjectSend solution using Docker Compose, complete with a dedicated database container for an efficient and robust file-sharing platform.
Here’s the complete Docker Compose configuration:
version: '3'
services:
projectsend:
image: linuxserver/projectsend
container_name: projectsend
environment:
- PUID=998
- PGID=100
- TZ=Etc/UTC
- MAX_UPLOAD=5000
volumes:
- /docker/projectsend/config:/config #Config Volume Goes Here
- /docker/projectsend/data:/data #File Storage Volume Goes Here
ports:
- 8010:80
networks:
- web
restart: unless-stopped
db:
image: yobasystems/alpine-mariadb:10.11.6
container_name: mariadb-projectsend
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 50
environment:
- MYSQL_ROOT_PASSWORD=yourpassword
- MYSQL_DATABASE=projectsend
- MYSQL_USER=projectsend-user
- MYSQL_PASSWORD=yourpassword
- TZ=Etc/UTC
volumes:
- /docker/projectsend/database:/var/lib/mysql #Database Volume Goes Here
command:
- '--default-authentication-plugin=mysql_native_password'
networks:
- web
restart: unless-stopped
networks:
web:
external: true
This configuration will help you set up a robust file-sharing solution tailored to your needs.