38 lines
1.7 KiB
Markdown
38 lines
1.7 KiB
Markdown
# Portainer Deployment
|
|
|
|
This repository contains the deployment configuration for **Portainer CE**, a lightweight management UI that allows you to easily manage your different Docker environments (hosts, containers, images, volumes, and networks).
|
|
|
|
## 🏗️ Architecture Overview
|
|
|
|
* **Service**: Portainer Community Edition
|
|
* **Networking**: Connected to the `web_traffic` external network for access via your reverse proxy.
|
|
* **Socket Integration**: Mounts `/var/run/docker.sock` to allow Portainer to manage the local Docker engine.
|
|
* **CI/CD**: Automated deployment via Woodpecker CI on every push to the `main` branch.
|
|
|
|
## 📂 Repository Structure
|
|
|
|
* `docker-compose.yaml`: Configures the Portainer service with persistent data storage and Docker socket access.
|
|
* `.woodpecker.yaml`: Handles the automated deployment to the `/home/george/portainer` directory.
|
|
|
|
## 💾 Persistence
|
|
|
|
All Portainer configurations, users, and settings are stored in the `./portainer_data` volume. This ensures your dashboard setup survives container updates and recreations.
|
|
|
|
## 🚀 Deployment
|
|
|
|
### Manual Setup
|
|
Ensure the `web_traffic` network exists before starting:
|
|
```bash
|
|
docker network create web_traffic
|
|
docker compose up -d
|
|
```
|
|
|
|
### CI/CD Workflow
|
|
|
|
The Woodpecker pipeline performs the following on every push to main:
|
|
- Syncs the repository files to the server.
|
|
- Triggers a docker compose up -d with --pull always and --force-recreate to ensure you are always running the latest version of Portainer CE.
|
|
|
|
## 🔒 Security Note
|
|
|
|
Since Portainer has full access to the Docker socket, ensure that the admin password is set immediately upon first login and that access is restricted via your reverse proxy. |