Deployment - cynchro/OldSchoolFrontFrame GitHub Wiki

Deployment

OLS apps are static files — no server runtime, no build step, no compilation. Deploy anywhere that serves static files.


Docker (included)

The repository includes a Dockerfile and docker-compose.yml using Nginx:

docker compose up --build

Serves the app at http://localhost:9000/example/.

To customize the port, edit docker-compose.yml:

ports:
  - "8080:80"   # change 9000 → 8080

Nginx

Example nginx.conf (also included in the repo):

server {
    listen 80;
    server_name _;
    root /usr/share/nginx/html;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

The try_files directive ensures direct URL access works even with hash routing. Hash URLs don't reach the server, but it's a safe default.


Apache

<VirtualHost *:80>
    DocumentRoot /var/www/myapp
    DirectoryIndex index.html

    <Directory /var/www/myapp>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

No .htaccess rewrite rules are needed — hash routing is handled entirely in the browser.


GitHub Pages

  1. Push your app to a GitHub repository
  2. Go to Settings → Pages
  3. Set source to your branch and folder (e.g. /root or /docs)
  4. Your app is live at https://<user>.github.io/<repo>/

Update import paths if deploying to a subdirectory:

// app.js — if deployed to /myapp/
initApp({
  routes: { home: 'home' },
  config: { yamlPath: './myapp/config/app.yaml' },
});

Any static host

OLS apps work on:

  • Netlify (drag & drop the folder)
  • Vercel (static output)
  • AWS S3 + CloudFront
  • Azure Static Web Apps
  • Cloudflare Pages
  • PHP shared hosting (just copy files)

The only requirement is that files are served over HTTP or HTTPS (not file://), because ES modules require a proper origin for CORS.


Production checklist

  • Set dev: false in initApp() (removes console logs and window.$ols)
  • Set correct config.yamlPath / config.jsonPath for production environment
  • Verify all module paths are correct relative to the served root
  • Confirm the static server sets appropriate cache headers for JS/CSS assets
  • Test navigation by directly opening hash URLs (e.g. https://example.com/#/clientes)
⚠️ **GitHub.com Fallback** ⚠️