Code Monkey home page Code Monkey logo

jamal's Introduction

subnet: 172.17.0.0/16 gateway: 172.17.0.1

Host (can be multiple/individual hosts) | +-- traefik:2.10.5, 0.0.0.0:80/tcp, :::80->80/tcp | 0.0.0.0:443/tcp, :::443->443/tcp | +-- app:, 3000/tcp (or via UNIX socket) | +-- postgresql:16.1, 0.0.0.0:5432/tcp, :::5432/tcp->5432/tcp

Jail environments:

zroot/JE/traefik-2.10.5 zroot/JE/app- zroot/JE/postgresql-16.1

Jail datasets:

zroot/JAIL/traefik/ (ACTIVE) interface=lo zroot/JAIL/app/ (ACTIVE) mountpoint=/rails, interface=lo zroot/JAIL/postgresql/ (ACTIVE) interface=lo zroot/JAIL/postgresql/data16 mountpoint=/postgresql/db/postgres/data16 postgresql_data dir

Host: (Eventually read-only) zroot/ROOT/ (NR) mountpoint=/

db

PostgreSQL 16.1 The port on FreeBSD uses PG_UID=770 (/var/db/postgres/data16), Docker uses 999 (/var/lib/postgresql) Both set en_US.UTF-8 by default

Docker sets ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data

So we need to expose/create a similar dataset zroot/JAIL/postgresql/data16 which mounts to /db/postgres (or /db/postgres/data16) (or similar)

traefik

traefik 2.10.5 The Docker image is straightforward Previoulsy, we used nginx with BROTLI and HEADERS_MORE modules. Additionally, we install acme.sh (optionally)

app

The Rails Docker image installs Ruby 3.2.2, WORKDIR /rails, sets the following env vars: RAILS_ENV="production" BUNDLE_DEPLOYMENT="1" BUNDLE_PATH="/usr/local/bundle" BUNDLE_WITHOUT="development" Builds the gems, precompile assets, creates a user/group rails:rails, prepares the database, and runs rails server on port 3000

Try with FreeBSD ruby pkg/gems again, now that we are building them. Otherwise, stay with rbenv

Overall is a similar structure to what is being used for development/production on FreeBSD with jails. All jails need to be VNET jails and have the host use ipfw/pf to forward/expose ports. Previously we used either raw sockets or loopback interfaces from the host directly. The performance penalty should be negligible.

jamal's People

Contributors

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