Teleporter Compose is a project that enables easy deployment of development environments using Docker Compose. This repository contains the necessary files to configure and launch multiple Docker containers.
- Docker
- Docker Compose
>=2.20.3
Tip
For our educational purposes, we are using Docker Desktop, which is available on Linux, macOS (Intel & Apple Silicon chips), and Windows. An alternative could be Podman Desktop, although it remains untested at the moment.
The project documentation is available in the docs/
directory.
This project leverages Docker Compose to manage various applications and services, all of which are accessible via a centralized homepage at localhost. This homepage not only provides access to the different web services hosted by the Compose setup but also monitors and displays the status of launched and usable servers (e.g., PHP, MariaDB).
Below is a list of the containers configured for this project, divided into application containers and core containers.
Application Containers
-
VSCode Server
- Container Name:
teleporter-vscode
- Image:
linuxserver/code-server:4.21.2
- Description: A web-based Visual Studio Code instance.
- Key Features:
- Supports a list of pre-installed extensions.
- Integrates with local code directory.
- Container Name:
-
Web Server (Caddy)
- Container Name:
teleporter-caddyserver
- Image:
caddy:2.7.6
- Description: A versatile web server for hosting web applications.
- Key Features:
- Health checks to ensure server reliability.
- Customizable through Caddyfile and environment variables.
- Container Name:
-
Backup
- Container Name:
teleporter-backup
- Image:
docker:dind
- Description: Manages backup operations for the system.
- Key Features:
- Integrates with MariaDB, PostgreSQL, and MongoDB.
- Utilizes custom backup scripts.
- Container Name:
-
DBMS Access (Adminer)
- Container Name:
teleporter-adminer
- Image:
adminer:4.8.1
- Description: A database management tool for MariaDB.
- Key Features:
- Pre-configured with MariaDB settings.
- Uses Dracula theme for UI.
- Container Name:
-
DBMS Access (pgAdmin)
- Container Name:
teleporter-pgadmin4
- Image:
dpage/pgadmin4:8.5
- Description: A web-based PostgreSQL administration tool.
- Key Features:
- Default email and password configured.
- Integrates with local servers.json file.
- Container Name:
-
DBMS Access (PHPmyAdmin)
- Container Name:
teleporter-phpmyadmin
- Image:
oclock/teleporter-phpmyadmin:dd7d23c5eea0cc4d01c658a82405123cb86a2ef6
- Description: Another database management tool, primarily for MySQL/MariaDB.
- Key Features:
- Configured with root user access.
- Automatically restarts on failure.
- Container Name:
-
DBMS Access (MongoExpress)
- Container Name:
teleporter-mongo-express
- Image:
mongo-express:1.0.2-20-alpine3.19
- Description: A web-based MongoDB administration interface.
- Key Features:
- Admin access enabled.
- Base URL configured for easy access.
- Container Name:
-
DBMS (MariaDB)
- Container Name:
teleporter-mariadb
- Image:
mariadb:11.3.2
- Description: Provides MariaDB database services.
- Key Features:
- Pre-configured with root password.
- Health checks to ensure database availability.
- Container Name:
-
DBMS (MongoDB)
- Container Name:
teleporter-mongodb
- Image:
mongo:7.0
- Description: Provides MongoDB database services.
- Key Features:
- Configured with root user credentials.
- Health checks to ensure database availability.
- Container Name:
-
DBMS (PostgreSQL)
- Container Name:
teleporter-postgres
- Image:
postgres:16.2
- Description: Provides PostgreSQL database services.
- Key Features:
- Configured with default password.
- Always restarts on failure.
- Container Name:
-
PHP Environment
- Container Name:
teleporter-php
- Image:
php:8.3-fpm-alpine
- Description: Provides a PHP runtime environment.
- Key Features:
- Integrates with local web directory.
- Supports FPM for fast processing.
- Container Name:
Core Containers
-
Dashboard (Homepage)
- Container Name:
teleporter-homepage
- Image:
ghcr.io/gethomepage/homepage:v0.9.1
- Description: Provides a central dashboard for the Teleporter system.
- Key Features:
- Customizable user interface based on environment variables.
- Integrates with VPN setup.
- Container Name:
-
Reverse Proxy (HAProxy)
- Container Name:
teleporter-haproxy
- Image:
haproxy:lts-alpine
- Description: A high-performance reverse proxy server.
- Key Features:
- Customizable with HAProxy configuration.
- Integrates with VPN setup for seamless routing.
- Container Name:
-
Terminal
- Container Name:
teleporter-terminal
- Image:
oclock/teleporter-terminal:bdc685e9f5b1a9ef3565b93c2a3ee2bdf95fe74e
- Description: Provides terminal access within a web interface.
- Key Features:
- Supports various environment configurations.
- Integrates with Docker socket for extended functionalities.
- Container Name:
-
WireGuard VPN
- Container Name:
teleporter-vpn
- Image:
oclock/teleporter-vpn:dd7d23c5eea0cc4d01c658a82405123cb86a2ef6
- Description: Provides secure VPN access using WireGuard.
- Key Features:
- Configurable via environment variables.
- Health checks to ensure VPN connectivity.
- Container Name:
-
File Browser
- Container Name:
teleporter-filebrowser
- Image:
oclock/teleporter-filebrowser:dd7d23c5eea0cc4d01c658a82405123cb86a2ef6
- Description: A simple file browser for managing files within the system.
- Key Features:
- No authentication required.
- Integrates with local
CODE_DIR
andCONFIG_DIR
.
- Container Name:
-
AutoHeal Service
- Container Name:
teleporter-autoheal
- Image:
willfarrell/autoheal
- Description: Monitors and automatically restarts failing containers.
- Key Features:
- Uses Docker socket for container management.
- Always restarts on failure.
- Container Name:
-
Template Config
- Container Name:
teleporter-templating-config
- Image:
oclock/teleporter-templating-config:6f879ed7ceac341c56f42db742e4d8b210907365
- Description: Manages templated configurations.
- Key Features:
- Configurable via environment variables.
- Integrates with local config directory.
- Container Name:
-
Clone the repository to your local machine:
git clone https://github.com/O-clock-Dev/teleporter-compose.git cd teleporter-compose
-
Start the containers:
docker compose up
To start the containers, use the following command:
docker compose up
To stop the containers, use the following command:
docker compose down
If you need to recreate the containers (for example, after a configuration change), use the following command:
docker compose up --force-recreate
This repository contains the main configuration and associated files for Docker Compose. The primary compose.yml
file uses include
directives to incorporate specific configurations for application containers and services.
- compose.yml: Main configuration file for Docker Compose.
include.app.compose.yaml
: Includes descriptions for application containers.include.core.compose.yaml
: Includes descriptions for core services.
- code/: Default directory for your coding files.
- config/: Configuration files used for application and service containers.
- .docker/: Configuration files used for containers.
- data/: Local configuration files for applications.
The existing local.env
file contains the following variables to help you customize your experience: CODE_DIR
, CONFIG_DIR
, BACKUP_DIR
, LANG
, TZ
, WEB_DIR
, WEB_PUBLIC_DIR
.
The local.env
file allows you to configure various aspects of the development and production environment. Here are some examples of what you can do with these variables:
- AUTOHEAL_CONTAINER_LABEL and AUTOHEAL_START_PERIOD: Configure auto-healing for Docker containers to monitor and automatically restart failing containers.
- CODE_DIR: Define the working directory for local code used in the app (e.g., VSCode or Caddy).
- CONFIG_DIR: Define the data folder that contains items like config files.
- BACKUP_DIR: Where automatic BDD backups goes.
- LANG and TZ: Set the language and timezone for the containers, which is essential for applications that depend on locale settings.
- VPN_LOCAL_IP, VPN_NETWORK, VPN_WILDCARD, and VPN_PRIV_IP: Configure VPN settings to enable secure access to your local network via WireGuard. Requires
.env
to fully function; check the VPN Configuration section. - VSCODE_EXTENSIONS_LIST: Specify a list of Visual Studio Code extensions to install automatically, enhancing the development experience.
- WEB_DIR and WEB_PUBLIC_DIR: Define directories for web files, making it easier to deploy and manage web applications.
The file contains all settings. It's not recommanded to update this file, you should use local.env instead.
Note
This configuration is necessary to customize the names displayed on the Teleporter Compose homepage interface.
To access the VPN functionality of the VPN container (WireGuard), you need to generate a .env
file yourself. Below is an example of what the .env
file might look like (do not include the actual values or change them):
FULL_NAME=John Doe
FIRST_NAME=John
LAST_NAME=Doe
PROMO=johnlennon
VPN_NAME=john-doe
KEY_PUB=WGprivatekey
KEY_PRIV=WGpubkey
KEY_VPN_SERVER=WGserverpubkey
IP_PRIV=10.0.0.244
VPN_SERVER=hostnameOrIp
VPN_SERVER_PORT=44222
VPN_LOCAL_PORT=44222
Caution
Ensure that this file is properly configured with your own details and stored securely, as it contains sensitive information needed to establish a secure VPN connection.
Volumes are used to persist data between container restarts. You can configure volumes in the compose files.
Contributions are welcome! Please follow the steps below to contribute:
- Fork the repository.
- Create a branch for your feature (git checkout -b feature/my-feature).
- Commit your changes (git commit -am 'Add a new feature').
- Push your branch (git push origin feature/my-feature).
- Open a Pull Request.
This project is licensed under the AGPLv3 License. See the LICENSE file for more details.