Coder Social home page Coder Social logo

sergeyyarkov / node-docker-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 174 KB

This app showcases a website built with NodeJS. The site has a set of articles, each article has a separate page, all data about the article is stored in the PostgreSQL database. Docker is used to deploy the application.

License: MIT License

JavaScript 61.53% CSS 5.44% Handlebars 15.96% Dockerfile 1.78% Shell 15.28%
postgresql docker nodejs database nginx

node-docker-example's Introduction

node-docker-example

About

This app showcases a website built with NodeJS. The site has a set of articles, each article has a separate page, all data about the article is stored in the PostgreSQL database. Docker is used to deploy the application.

๐Ÿ”— Deployed on Render

Folder structure

.
โ””โ”€โ”€ .
    โ”œโ”€โ”€ controllers - contains handlers for http requests
    โ”œโ”€โ”€ helpers - some string, file and database helper functions
    โ”œโ”€โ”€ middlewares - contains functions that will execute before the handler is executed
    โ”œโ”€โ”€ models - contains entities for their creation or getting
    โ”œโ”€โ”€ nginx - nginx web server config or certificate will place here
    โ”œโ”€โ”€ preloads - every file in this folder will be executed before starting the server
    โ”œโ”€โ”€ public - contains static files for http response
    โ”œโ”€โ”€ scripts - some bash scripts
    โ”œโ”€โ”€ sql - database ".sql" files for querying
    โ””โ”€โ”€ views - file for page rendering

How to deploy

  1. Clone this repository git clone https://github.com/sergeyyarkov/node-docker-example.git .
  2. Configure enviroment variables in docker-compose.yml for postgres and nodejs serivces if you need to
  3. Build and run application with docker-compose up --build

Requirements

  • Node.js >= v14.13.0
  • Docker

node-docker-example's People

Contributors

sergeyyarkov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.