Docker Setup

Docker configuration for both backend and frontend services

Docker Setup

Both the backend and frontend are fully containerized with Docker.

Backend Docker

Services

ServiceImage / BuildPortPurpose
PHP appFrankenPHP (custom)80/443Symfony + web server
PostgreSQLpostgres:165432Database
Redisredis:76379Cache + message queue
Mailpitaxllent/mailpit8025Email testing (dev)

Production Image

The backend uses a multi-stage Dockerfile with a frankenphp_prod target:

  • Based on the official FrankenPHP Docker image
  • Includes PHP 8.4 with all required extensions
  • Runs Caddy + PHP in a single process
  • Automatic HTTPS with Let's Encrypt
  • No Nginx, no PHP-FPM — simplified deployment

Frontend Docker

Services

ServiceImage / BuildPortPurpose
appNode 20 Alpine3000Nuxt app server

Development

services:
  app:
    build:
      context: .
      target: dev
    ports:
      - "3000:3000"
    volumes:
      - .:/app
      - node_modules:/app/node_modules
    command: npm run dev
  • Source code is mounted for hot-reload
  • node_modules uses a named volume (isolated from host)
  • Dev server binds to 0.0.0.0:3000

Production Image

Multi-stage build:

  1. Dev stage — installs all dependencies, used for testing
  2. Prod stage — installs production dependencies only, builds Nuxt, runs the optimized server

The production image runs node .output/server/index.mjs — Nuxt's Nitro server.

Running Both Services

Local Development

# Terminal 1: Start backend
cd go-mvp-backend
docker compose up -d

# Terminal 2: Start frontend
cd go-mvp-frontend
docker compose up -d

Backend available at http://localhost (port 80), frontend at http://localhost:3000.

Port Summary

ServiceLocal URL
Backend APIhttp://localhost
Backend Adminhttp://localhost/admin
API Docshttp://localhost/api/doc
Frontendhttp://localhost:3000
Mailpithttp://localhost:8025