This app is configured to deploy to Dokploy using Docker images built and pushed via GitHub Actions to GitHub Container Registry (ghcr.io).
- GitHub Repository - Your code should be on GitHub
- Actions permissions - Repo Settings → Actions → General: allow Read and write permissions (or equivalent so
GITHUB_TOKENcan push packages) - Dokploy Instance - Have Dokploy installed and running
- Ensure workflow permissions allow publishing Packages (see Prerequisites).
- The workflow uses
GITHUB_TOKEN; you do not needDOCKERHUB_*secrets for the default setup.
git push origin mainThe GitHub Actions workflow will automatically:
- Build the Docker image
- Push it to GHCR as
ghcr.io/<owner-lowercase>/<repo-lowercase>:latestandmain-<commit-sha>
Application Settings:
- Source Type: Docker
- Docker Image:
ghcr.io/your-github-org-or-user/recicar:latest(use your real GitHubowner/repopath in lowercase)
Environment Variables:
SPRING_PROFILES_ACTIVE=prod
DATABASE_URL=jdbc:postgresql://your-host:5432/marketplace_prod
DATABASE_USERNAME=your_db_user
DATABASE_PASSWORD=your_db_password
JWT_SECRET=your_secure_jwt_secret
SERVER_PORT=8080Domain:
- Click Dice icon to generate domain or add custom domain
- Port:
8080
Health Check Configuration (Advanced → Swarm Settings):
{
"Test": ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"],
"Interval": 30000000000,
"Timeout": 10000000000,
"StartPeriod": 30000000000,
"Retries": 3
}Update Config (for automatic rollbacks):
{
"Parallelism": 1,
"Delay": 10000000000,
"FailureAction": "rollback",
"Order": "start-first"
}- Click Deploy in Dokploy
- Access your application via the configured domain
GHCR does not provide Docker Hub-style webhooks. Typical options:
- Dokploy deploy webhook / API — call it from an extra step at the end of
.github/workflows/deploy.yml(store the URL or API key as GitHub secrets), or - Manual / scheduled redeploy in Dokploy after a successful Actions run.
See DEPLOYMENT.md for an example curl step using DOKPLOY_DEPLOY_HOOK_URL.
- Quick Setup:
.github/DOKPLOY_SETUP.md - Complete Guide:
DEPLOYMENT.md - GitHub Actions:
.github/README.md
# Start PostgreSQL
docker-compose up -d postgres
# Run migrations
./gradlew flywayMigrate
# Run application
./gradlew bootRun# Run with dev profile (local PostgreSQL)
./gradlew runLocal
# Run with test profile (PostgreSQL test desde .env TEST_*; en Dokploy usa DATABASE_* hacia el Postgres del stack)
./gradlew runTest
# Run with prod profile (PostgreSQL prod desde .env PROD_*)
./gradlew runProd- Copy
.env.exampleto.env(if available) - Fill in your database credentials
- Never commit
.envto version control
# Migrate dev database
./gradlew flywayMigrateDev
# Migrate test database
./gradlew flywayMigrateTest
# Migrate prod database
./gradlew flywayMigrateProd./gradlew test./gradlew cucumber./gradlew bootJarThe JAR will be in build/libs/recicar-0.0.1-SNAPSHOT.jar
docker build -t recicar:local .docker run -p 8080:8080 \
-e DATABASE_URL=jdbc:postgresql://host.docker.internal:5432/marketplace_dev \
-e DATABASE_USERNAME=marketplace_user \
-e DATABASE_PASSWORD=marketplace_pass \
-e SPRING_PROFILES_ACTIVE=dev \
recicar:localcurl http://localhost:8080/actuator/healthcurl http://localhost:8080/actuator/metricscurl http://localhost:8080/actuator/info# Find process using port 8080
lsof -i :8080
# Kill the process
kill -9 <PID>- Verify PostgreSQL is running
- Check credentials in
.envor environment variables - Ensure database exists
- Check firewall/network settings
El usuario de la app debe poder crear tablas en el esquema public. Como postgres:
\c marketplace_dev
GRANT CREATE, USAGE ON SCHEMA public TO marketplace_user;
ALTER SCHEMA public OWNER TO marketplace_user;Script de referencia: docs/postgres-local-dev-setup.sql
# Clean build
./gradlew clean build
# Clear Gradle cache
rm -rf ~/.gradle/caches/Need Help? Check the full deployment documentation in DEPLOYMENT.md