Coder Social home page Coder Social logo

k4sku / pnpr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipepe/pnpr

0.0 0.0 0.0 1.9 MB

All in one container with ruby+rbenv, nginx + passenger, postgres 10 and redis

Home Page: https://hub.docker.com/r/ipepe/pnpr/

License: Apache License 2.0

Shell 17.27% Dockerfile 17.25% Ruby 65.48%

pnpr's Introduction

pnpr

Run Your passenger nginx postgres ruby the simple way

Changelog

  • 3.3
    • 3.3.1 - Change docker-entrypoint.rb to docker-entrypoint.sh to lower memory usage
    • 3.3.2 - Add passenger_max_requests=3000 and passenger_force_max_concurrent_requests_per_process=1000 to /cable
    • 3.3.3 - Remove npm install -g npm

Image naming meaing

v3.3-u20.04-r2.3.1-n10 means:

  • v3.3 - pnpr version
  • u20.04 - ubuntu version
  • r2.3.1 - ruby version
  • n10 - node version

Example docker-compose.yml

version: '3.2'
services:
  server:
    image: ipepe/pnpr:v3.3-u20.04-r2.3.1-n10
    restart: always
    network_mode: bridge
    healthcheck:
      disable: true
    environment:
      PGPASSWORD: Password1
      RAILS_ENV: 'staging'
    links:
      - postgres_db
    ports:
      - "3322:22"
      - "3080:80"
    volumes:
      - ./data/webapp:/home/webapp/webapp
      - ./data/ssh:/home/webapp/.ssh
    expose:
      - 80
      - 443
    labels:
      - "traefik.enable=true"
      - "traefik.port=80"
      - "traefik.frontend.rule=Host:example.org"
    logging:
      driver: json-file
      options:
        max-size: 50m

  postgres_db:
    network_mode: bridge
    image: postgres:15
    restart: always
    environment:
      POSTGRES_DB: webapp
      POSTGRES_USER: webapp
      POSTGRES_PASSWORD: Password1
    expose:
      - 5432
    volumes:
      - ./data/db:/var/lib/postgresql/data
      - ./data/dbdumps:/dbdumps

Environment variables

Variable Description
WITHOUT_MALLOC_ARENA_MAX Set to 1 to disable MALLOC_ARENA_MAX=2
RAILS_ENV Rails environment, defaults to production
RUBY_VERSION Ruby version, changing it will not reinstall rbenv
NODE_VERSION Node version, changing it will not reinstall nodenv
RAILS_ENV Rails environment, defaults to production
NODE_ENV Node environment, defaults to production
PASSENGER_FRIENDLY_ERROR_PAGES Set to on to enable friendly error pages. Set to off to disable
PASSENGER_MAX_REQUEST_QUEUE_SIZE Default is 1000, change it based on your preferences
PASSENGER_MAX_POOL_SIZE Default is 60, change it based on your preferences
PASSENGER_FRIENDLY_ERROR_PAGES Set to on to enable friendly error pages. Set to off to disable
NO_ACTION_CABLE Set to 1 to disable action cable
CABLE_PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS Default is 0, change it based on your preferences
PASSENGER_MAX_REQUESTS Default is 3000, change it based on your preferences

Cron/whenever is not working

It's probably because bundler command is not found. To ensure that env path is included in cron add env :PATH, ENV['PATH'] to schedule.rb

pnpr's People

Contributors

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