A simple full-stack web application designed for deployment on Dokploy.
- Frontend: Vue.js 3 + Vite (served via Nginx)
- Backend: Yii2 PHP Framework (Apache)
- Database: PostgreSQL 15
├── docker-compose.yml # Main compose file for local development
├── docker-compose.dokploy.yml # Main compose file for Dokploy
├── .env.example # Environment variables template
├── frontend/ # Vue.js application
│ ├── Dockerfile
│ ├── nginx.conf
│ └── src/
└── backend/ # Yii2 PHP application
├── Dockerfile
├── composer.json
├── config/
└── web/
- Docker and Docker Compose installed
- Git
-
Clone the repository:
git clone <your-repo-url> cd deploy-poc
-
Copy environment file:
cp .env.example .env
-
Build and run:
docker-compose up --build
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001/api
- Health Check: http://localhost:3001/api/health
- PostgreSQL: localhost:5433
Push this repository to GitHub, GitLab, or Bitbucket.
- Log in to your Dokploy dashboard
- Go to Projects → Create Project
- Select Docker Compose
- Connect your Git repository
- Set the compose file path to
docker-compose.dokploy.yml
In Dokploy, add these environment variables:
DB_NAME=app_db
DB_USER=app_user
DB_PASSWORD=your_secure_password
- Go to your service settings in Dokploy
- Add your domain under Domains
- Dokploy will automatically provision SSL via Let's Encrypt
Click Deploy and Dokploy will:
- Pull your code
- Build Docker images
- Start all services
- Configure networking and SSL
| Endpoint | Description |
|---|---|
GET /api |
API information |
GET /api/health |
Health check with database status |
| Variable | Description | Default |
|---|---|---|
DB_NAME |
PostgreSQL database name | app_db |
DB_USER |
PostgreSQL username | app_user |
DB_PASSWORD |
PostgreSQL password | app_password |
APP_ENV |
Application environment | production |
APP_DEBUG |
Enable debug mode | false |
- For local development, the network is auto-created by docker-compose
- For Dokploy deployment, use
docker-compose.dokploy.ymlwhich uses the externaldokploy-network - Data is persisted in a Docker volume (
postgres_data) - Avoid setting
container_namein docker-compose for Dokploy compatibility