Skip to content

FriOne/lyubimovstudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lyubimovstudio

This project was generated using Nx.

Project consist of 4 parts:

  • Admin is Angular application for administration part.
  • Client is React application for the site frontend.
  • API is NestJS application for the project API.
  • SSR Server is Express server that renders client app on a server.

Development

Before start

Run this command to pull all necessary docker containers.

  npm run docker-pull-all-images

Create uploads volume. It will be containing images uploaded from the admin part.

  docker volume create uploads

Launch

To launch dev development use command:

  npm install
  npm run dev

This launch all project parts except SSR in watch mode (SRR is used only on prod). Also, it creates two docker images: postgres db image and pgadmin for this db.

Users

Project admin user can be created with cli part of the api project, after project start you need to run this command:

  node dist/apps/api/cli.js

Users for pgadmin panel and database can be found inside .env file.

Production images

Before start

Before start building prod docker images, you need to make several steps to launch it.

  1. Create self-signed ssl certificate and its private key or put existed ones to docker/init/site.req.pem and docker/init/site.key.pem. More detailed about how to create self-signed certificates look here. Also, you can use this command.
  npm run generate-cert
  1. Set up enviroment variables. Clone .env file to .prod.env.
  • DB_SYNCHRONIZE is typeorm synchronize option.
  • DB_LOGGING is typeorm logging option.
  • GMAIL_USER is user that will be used to send mail from.
  • GMAIL_PASSWORD is password of the prev user.
  • OWNER_EMAIL is the email to where mail will be sent.

Launch

To create production build you need to run this command:

  npm run prod

It creates one intermediate image called lyubimovstudio-build and four images that is necessary to launch the project. These four images are lyubimovstudio-db, lyubimovstudio-api, lyubimovstudio-server, lyubimovstudio-ssr.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published