Giter Site home page Giter Site logo

calculonumerico's Introduction

Numeric Calculus

Containers

  • Webserver - Nginx;
  • Letsencrypt - Nginx;
  • Backend PHP - PHP-fpm;

3 Containers.

Infrastructure

Infrastructure calculonumerico

Requisites

Installation

Clone the repository recursively with:

user@host:~# git clone --recurse-submodules https://github.com/bgcorreia/calculonumerico.git

This mode the repositorys the frontend and backend are cloned.

Pre-execution

Create file .env in root directory on repository informing enviremont variables, example content:

user@host:~/calculonumerico# cat .env
APPNAME=www
DOMAIN=domain.com
[email protected]
TOKEN=token_seguro_p_webhook
REPOSITORIO_WEBFILES=https://github.com/bgcorreia/calculoNumerico-webfiles.git
RAMO=master
DIRETORIO=/var/www/html/

Define permissions for user www-data in directory back/front which will be mounted as volume in container. Because the user may not exist on the host host, we use the gid that is standard on any system. Execute:

user@host:~/calculonumerico# chown 33:33 -R volumes/calculoNumerico-webfiles

Execution

For production mode, in the root repository, execute the next command:

user@host:~/calculonumerico# docker-compose up -d

For local mode, in the root repository, execute the next command:

user@host:~/calculonumerico# docker-compose -f docker-compose-local.yml up -d

The option -d execute containers in background.

SSL

Per default, the first execution use no-ssl. Case need use ssl, after execution (with containers running), do following:

user@host:~/calculonumerico# docker exec numerico_letsencrypt  bash -c 'certbot certonly --email ${EMAIL_LETS} -a webroot --webroot-path=${DIRETORIO} -d ${FQDN} -d ${DOMAIN} --agree-tos'

OBS.: Use option -d according with need.

After, in projecty directory:

user@host:~/calculonumerico# docker-compose restart webserver_numerico
Restarting proxy ... done

Enjoy!

calculonumerico's People

Contributors

bgcorreia avatar

Stargazers

 avatar

Watchers

 avatar  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.