Skip to content

serveri/new.serveriry.fi.nuxtjs

Repository files navigation

new.serveriry.fi.nextjs

Vue v3 Nuxt TypeScript Node v18 Tailwind code style: prettier

Table of Contents

This project is Vue app that uses [Nuxt] to provide SSR and SEO for web application. Directus is used as a headless CMS.

Frontend

See frontend README for more information.

Backend

See backend README for more information.

Development

How to contribute

See CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Docker Commands

Vue app and Directus api are hosted in Docker containers.

Development

Command Line

  1. nmp install
  2. npm run dev

Docker

  • start - docker compose up -d --build
  • stop - docker compose down -v
  • logs - docker compose logs -f

Production

  1. Clone git repository.
  2. Copy .env.prod and .env.prod.db files to parent folder using cp <filename> <../filename>
  3. Edit CHANGE_ME values to safe passwords etc. in those .env files
  4. Start container (you may have to install docker compose command)
  • start - docker compose -f docker-compose.prod.yml up -d --build
  • stop - docker compose -f docker-compose.prod.yml down
  • logs - docker compose -f docker-compose.prod.yml logs

Updating production

  1. Navigate to build repositary and run git pull
  2. Reload docker with docker compose -f docker-compose.prod.yml up -d --build

Other

  • Go inside container - docker exec -it {{name}} bash

See docker compose docs

Services

Name Image IP:Port Explanation
app http-server 10.10.0.2:8000 HTTP server for frontend
db postgresql 10.10.0.3:5432 Database for Directus
cache redis 10.10.0.4 Cache for Directus
directus directus 10.10.0.4:8001 CMS