Giter VIP home page Giter VIP logo

pizza4c's Introduction

Pizza 4 Chaos

How to build

  1. Make sure you have Java JDK >= 17 installed
  2. Make sure you have Node >= 19 installed
  3. Run gradle bootRun
  4. Configure nginx
server {
    listen       80;
    server_name  localhost;

    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}
  1. Start nginx
  2. Goto http://localhost

Deployment

On the build machine:

  1. Make sure you have Java JDK >= 17 installed
  2. Make sure you have Node >= 19 installed
  3. Run gradle bootJar.
  4. Copy the resulting jar from build/libs/pizza4c-<version>.jar to the deployment server.

On the deployment server:

  1. Place the jar in your favorite app folder. Here /srv/pizza4c
  2. Configure systemd service:
[Unit]
Description=Pizza 4 Chaos

[Service]
WorkingDirectory=/srv/pizza4c/data
# While we allocate 256MB here, the application only needs about 70MB to run.
ExecStart=java -Xmx256M -Xms256M -jar /srv/pizza4c/pizza4c-0.0.2-SNAPSHOT.jar
Restart=always
User=pizza4c
Group=pizza4c

[Install]
WantedBy=multi-user.target
  1. Ensure the folder /srv/pizza4c/data exists and is accessible by user/group pizza4c
  2. Place a file called application.properties inside this data directory overriding the following default properties
# change this line if another application is already running on port 8080
# server.port=8080

# pizza4c.fax.service=SEND_FAX
pizza4c.fax.service.sendfax.username=<username>
pizza4c.fax.service.sendfax.password=<password>
# Sendfax "Sinkhole" address. Make sure this line is commented for production usage
pizza4c.fax.toAddress.override=+61261111111
# [email protected]
# pizza4c.fax.fileurl.server=pizza.noname-ev.de

# pizza4c.defaultRestaurant=
# Set this to false for production use
# pizza4c.staticRestaurantData=true

# pizza4c.pdf.companyName=NoName e.V.
# pizza4c.pdf.recipient=
# pizza4c.pdf.addressLine1=
# pizza4c.pdf.addressLine2=
# pizza4c.pdf.phone=
# pizza4c.pdf.email=
# pizza4c.pdf.lat=
# pizza4c.pdf.lng=

pizza4c.admin.secret=MY_PASSWORD_FOR_ADMIN_AREA
  1. Configure nginx config file:
server {
        # SSL configuration
        listen 443 ssl;
        listen [::]:443 ssl;
        include snippets/ssl-pizza.nnev.de.conf;
        include snippets/ssl-params.conf;

        server_name pizza.nnev.de;
        server_name pizza.noname-ev.de

        location / {
                proxy_pass http://127.0.0.1:8080; # Set whatever port is assigned to our pizza application.
                proxy_set_header X-Forwarded-For $remote_addr;
        }
}

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.