Docker Applications
Pigsty v1.5.1 comes with Docker and Docker Compose deployment support, where Docker Daemon will be enabled by default on the meta node.
You can use Docker to deploy and launch software applications quickly. You can directly access the PostgreSQL/Redis database deployed on the host in the container using the connection string.
- PgAdmin4: A GUI tool for managing PostgreSQL instances.
- PGWeb: A tool automatically generates back-end API services based on PG database schema.
- PostgREST: A tool to automatically generate backend API services based on PG database schema.
- ByteBase: A GUI tool for making PostgreSQL schema changes.
- Jupyter Lab: A battery-included Python lab environment for data analysis and processing.
You can also use Docker to execute some battery-included command tools.
- SchemaSPY: Generates detailed visual reports of database schemas.
- Pgbadger: Generate database log report.
You can also use Docker to pull up some battery-included open-source SaaS services.
- Gitlab: open-source code hosting platform.
- Habour: open-source mirror repo
- Jira: open-source project management platform.
- Confluence: open-source knowledge hosting platform.
- Odoo: open-source ERP
- Mastodon: PG-based social network
- Discourse: open-source forum based on PG and Redis
Add Upstream to Nginx
Most of the software described in this article provides a web interface to the public. While it can be accessed directly via IP: Port, we recommend using a domain name and unifying access from the Nginx proxy. Use the following configuration and commands to register a new service with Nginx.
PgAdmin4
PGAdmin4 is the popular PG control tool; use the following command to pull up the PgAdmin4 service on the meta node, default to host 8885 port, username [email protected], password: pigsty.
Copy the server access information to the /tmp/servers.json file and re-import it.
PGWeb
PGWeb is a browser-based PG client tool. Use the following command to pull up the PGWEB service on the meta node, defaulting to the host 8081 port.
Users need to fill in the database connection string, for example, the default CMDB:
postgres://dbuser_dba:[email protected]:5432/meta?sslmode=disable.
PostgREST
PostgREST is a binary component that automatically generates a REST API based on the PostgreSQL database schema.
The following command will pull up postgrest using docker (local port 8082, using the default admin user, exposing the Pigsty CMDB schema).
http://home.pigsty.cc:8883/ shows the available API that exposed by PostgREST
Visiting http://10.10.10.10:8884 will show all the definitions of the auto-generated APIs, which can be automatically generated in the Swagger Editor.
curl http://10.10.10.10:8884/pg_cluster will anonymously access the data table pigsty.pg_cluster.
If you want to add, delete, check and design more fine-grained privilege control, please refer to Tutorial 1 - The Golden Key to generate a signed JWT.
ByteBase
ByteBase is a tool for making database schema changes. The following command will start a ByteBase on meta node port 8887.
Visit http://10.10.10.10:8887/ to use ByteBase. To start schema changes, you need to create the project, environment, instance, and database.
Jupyter
Jupyter Lab is a data analysis environment. The following command will start a Jupyter Server on port 8084.
Visit http://10.10.10.10:8888/ to use JupyterLab, (you need to fill in the auto-generated Token). Note that Pigsty also has JupyterLab installed on the host.
SchemaSPY
Generate a database schema report using CMDB as an example. The following docker, using.
Then visit http://pigsty/schema/pg-meta/meta/pigsty to access the Schema report.
Gitlab
Please refer to the Gitlab Docker Deploy Doc to complete the Docker deployment.
Discourse
Build open source forum Discourse. You need to adjust the config app.yml, focusing on the SMTP part of the config.
Sample Discourse config
Then, just execute the following command and pull up Discourse.
Mastodon
The v1.5.1 source reserved this section, but did not ship or document a Mastodon deployment template.