forked from joubertredrat/devbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa904de
commit d1ef0cf
Showing
6 changed files
with
160 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
DEVBOX_POSTGRES142_POSTGRES_USER ?= postgres | ||
DEVBOX_POSTGRES142_POSTGRES_PASSWORD ?= password | ||
DEVBOX_POSTGRES142_POSTGRES_DB ?= dev | ||
DEVBOX_POSTGRES142_DB_EXPORT_PORT ?= 15442 | ||
DEVBOX_POSTGRES142_PGADMIN_EXPORT_PORT ?= 15443 | ||
DEVBOX_POSTGRES142_PGADMIN_EMAIL ?= [email protected] | ||
DEVBOX_POSTGRES142_PGADMIN_PASSWORD ?= password | ||
DEVBOX_POSTGRES142_PGWEB_EXPORT_PORT ?= 15444 | ||
DEVBOX_POSTGRES142_DBGATE_EXPORT_PORT ?= 15445 | ||
|
||
postgres14.2-up: | ||
docker-compose -f postgres/14.2/docker-compose.yml -p ${DEVBOX_PROJECT_NAME} up -d | ||
|
||
postgres14.2-down: | ||
docker-compose -f postgres/14.2/docker-compose.yml -p ${DEVBOX_PROJECT_NAME} down | ||
|
||
postgres14.2-status: | ||
docker-compose -f postgres/14.2/docker-compose.yml -p ${DEVBOX_PROJECT_NAME} ps | ||
|
||
postgres14.2-logs: | ||
docker-compose -f postgres/14.2/docker-compose.yml -p ${DEVBOX_PROJECT_NAME} logs -f | ||
|
||
postgres14.2-purge: | ||
docker-compose -f postgres/14.2/docker-compose.yml -p ${DEVBOX_PROJECT_NAME} down --volumes | ||
|
||
postgres14.2-help: | ||
@echo | ||
@echo "Commands:" | ||
@echo | ||
@echo " make postgres14.2-up Start Postgres 14.2 service and management tools" | ||
@echo " make postgres14.2-down Stop Postgres 14.2 service and management tools" | ||
@echo " make postgres14.2-status Status from running services" | ||
@echo " make postgres14.2-logs Logs from running services" | ||
@echo " make postgres14.2-purge Delete all Postgres 14.2 data" | ||
@echo " make postgres14.2-info Information about the services for use" | ||
@echo " make postgres14.2-help This help :)" | ||
@echo | ||
@echo "Available configurable environment variables:" | ||
@echo | ||
@echo " DEVBOX_POSTGRES142_POSTGRES_USER Default admin user" | ||
@echo " DEVBOX_POSTGRES142_POSTGRES_PASSWORD Default ${DEVBOX_POSTGRES142_POSTGRES_USER} password" | ||
@echo " DEVBOX_POSTGRES142_POSTGRES_DB Default database" | ||
@echo " DEVBOX_POSTGRES142_DB_EXPORT_PORT Port to expose Postgres 14.2 in docker for your environment" | ||
@echo " DEVBOX_POSTGRES142_PGADMIN_EXPORT_PORT Port to expose PgAdmin in docker for access in your browser" | ||
@echo " DEVBOX_POSTGRES142_PGADMIN_EMAIL E-mail to login in PgAdmin in browser" | ||
@echo " DEVBOX_POSTGRES142_PGADMIN_PASSWORD Password to login in PgAdmin in browser" | ||
@echo " DEVBOX_POSTGRES142_PGWEB_EXPORT_PORT Port to expose Pgweb in docker for access in your browser" | ||
@echo " DEVBOX_POSTGRES142_DBGATE_EXPORT_PORT Port to expose DbGate in docker for access in your browser" | ||
@echo | ||
|
||
postgres14.2-info: | ||
@echo | ||
@echo "Postgres 14.2 information" | ||
@echo | ||
@echo " Host: 0.0.0.0" | ||
@echo " Port: ${DEVBOX_POSTGRES142_DB_EXPORT_PORT}" | ||
@echo " User: ${DEVBOX_POSTGRES142_POSTGRES_USER}" | ||
@echo " Password: ${DEVBOX_POSTGRES142_POSTGRES_PASSWORD}" | ||
@echo " Database: ${DEVBOX_POSTGRES142_POSTGRES_DB}" | ||
@echo " PgAdmin: http://0.0.0.0:${DEVBOX_POSTGRES142_PGADMIN_EXPORT_PORT}" | ||
@echo " PgAdmin user: ${DEVBOX_POSTGRES142_PGADMIN_EMAIL}" | ||
@echo " PgAdmin password: ${DEVBOX_POSTGRES142_PGADMIN_PASSWORD}" | ||
@echo " Pgweb: http://0.0.0.0:${DEVBOX_POSTGRES142_PGWEB_EXPORT_PORT}" | ||
@echo " DbGate: http://0.0.0.0:${DEVBOX_POSTGRES142_DBGATE_EXPORT_PORT}" | ||
@echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
db.postgres142.devbox.local:5432:dev:postgres:password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"Servers": { | ||
"1": { | ||
"Name": "db.postgres142.devbox.local", | ||
"Group": "Servers", | ||
"Host": "db.postgres142.devbox.local", | ||
"Port": 5432, | ||
"MaintenanceDB": "postgres", | ||
"Username": "postgres", | ||
"PassFile": "/pgadmin4/pgpassfile", | ||
"SSLMode": "prefer", | ||
"SSLCert": "<STORAGE_DIR>/.postgresql/postgresql.crt", | ||
"SSLKey": "<STORAGE_DIR>/.postgresql/postgresql.key", | ||
"SSLCompression": 0, | ||
"Timeout": 10, | ||
"UseSSHTunnel": 0, | ||
"TunnelPort": "22", | ||
"TunnelAuthentication": 0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
version: "3.8" | ||
|
||
services: | ||
db.postgres142.devbox.local: | ||
image: postgres:14.2-alpine | ||
environment: | ||
POSTGRES_USER: ${DEVBOX_POSTGRES142_POSTGRES_USER:-postgres} | ||
POSTGRES_PASSWORD: ${DEVBOX_POSTGRES142_POSTGRES_PASSWORD:-password} | ||
POSTGRES_DB: ${DEVBOX_POSTGRES142_POSTGRES_DB:-dev} | ||
volumes: | ||
- postgres142_db_data:/var/lib/postgresql/data | ||
networks: | ||
- postgres142_network_local | ||
ports: | ||
- ${DEVBOX_POSTGRES142_DB_EXPORT_PORT:-15442}:5432 | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 10s | ||
timeout: 10s | ||
retries: 3 | ||
pgadmin.postgres142.devbox.local: | ||
image: dpage/pgadmin4:5 | ||
depends_on: | ||
- db.postgres142.devbox.local | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: ${DEVBOX_POSTGRES142_PGADMIN_EMAIL:[email protected]} | ||
PGADMIN_DEFAULT_PASSWORD: ${DEVBOX_POSTGRES142_PGADMIN_PASSWORD:-password} | ||
volumes: | ||
- ./config/servers.json:/pgadmin4/servers.json | ||
- ./config/pgpassfile:/pgadmin4/pgpassfile | ||
networks: | ||
- postgres142_network_local | ||
ports: | ||
- ${DEVBOX_POSTGRES142_PGADMIN_EXPORT_PORT:-15443}:80 | ||
pgweb.postgres142.devbox.local: | ||
image: sosedoff/pgweb:latest | ||
depends_on: | ||
- db.postgres142.devbox.local | ||
environment: | ||
DATABASE_URL: postgres://${DEVBOX_POSTGRES142_POSTGRES_USER:-postgres}:${DEVBOX_POSTGRES142_POSTGRES_PASSWORD:-password}@db.postgres142.devbox.local:5432/${DEVBOX_POSTGRES142_POSTGRES_DB:-dev}?sslmode=disable | ||
networks: | ||
- postgres142_network_local | ||
ports: | ||
- ${DEVBOX_POSTGRES132_PGWEB_EXPORT_PORT:-15444}:8081 | ||
dbgate.postgres142.devbox.local: | ||
image: dbgate/dbgate:alpine | ||
depends_on: | ||
- db.postgres142.devbox.local | ||
environment: | ||
CONNECTIONS: postgres1 | ||
ENGINE_postgres1: postgres@dbgate-plugin-postgres | ||
LABEL_postgres1: db.postgres142.devbox.local | ||
SERVER_postgres1: db.postgres142.devbox.local | ||
PORT_postgres1: 5432 | ||
USER_postgres1: ${DEVBOX_POSTGRES142_POSTGRES_USER:-postgres} | ||
PASSWORD_postgres1: ${DEVBOX_POSTGRES142_POSTGRES_PASSWORD:-password} | ||
networks: | ||
- postgres142_network_local | ||
ports: | ||
- ${DEVBOX_POSTGRES142_DBGATE_EXPORT_PORT:-15445}:3000 | ||
|
||
volumes: | ||
postgres142_db_data: | ||
|
||
networks: | ||
postgres142_network_local: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters