Coder Social home page Coder Social logo

barracas's Introduction

barracas

Gestao de espaços

Building dependencies

npm run build

Setting new master Password

To set a new master password i.e. for user.id==1 run:

node install.js

TODO

DB setup

Either run config.sh if you are setting up a new AWS instance. Alternatively use this:

sudo mysql -u root -p -e "CREATE DATABASE barracas;"
mysql -u brunocosta -D barracas -p <SQL/LATEST_dump.sql
mysql -u brunocosta -p -e "CREATE USER '[user]'@'localhost' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON barracas.* TO 'myapp'@'localhost'; FLUSH PRIVILEGES;" 

QR code:

Site: <dominio>/informacoes Preço e mapa

Docker

docker build -t barracas:v2024-1 .  
docker run --rm --name barracas-webserver -p 3037:3000 --mount type=bind,src=/run/mysqld/mysqld.sock,dst=/run/mysqld/mysqld.sock -d barracas:v2024-1
docker stop barracas-webserver
docker rmi barracas:v1

Nginx

Add the proxy for docker instance

server {
	server_name barracas.obanheiro.pt;
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/barracas.obanheiro.pt-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/barracas.obanheiro.pt-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
	
	access_log /var/log/nginx/barracas.obanheiro.pt.log;

	location / {
	       	proxy_set_header X-Real-IP $remote_addr;
	       	proxy_set_header X-Forward-Proto $scheme;
		proxy_set_header X_Forwarded_Proto $scheme;
		proxy_set_header X_Forwarded_Host $host;
		proxy_set_header HTTP_X_FORWARDED_PROTO $scheme;
		proxy_pass       http://127.0.0.1:3037;
	       	proxy_http_version 1.1;
	       	proxy_set_header Upgrade $http_upgrade;
	       	proxy_set_header Connection 'upgrade';
	       	proxy_set_header Host $host;
       		proxy_cache_bypass $http_upgrade;
	}	
}

Generate certificates

sudo certbot

Deploy the new version of dev

bash bin/deploy-new-version.sh

barracas's People

Contributors

forest-biotech-lab avatar netbofia avatar

Watchers

 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.