Skip to content

Commit

Permalink
feat: add db services
Browse files Browse the repository at this point in the history
  • Loading branch information
tylovejoy committed May 15, 2024
1 parent c687a52 commit 2d29bab
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 45 deletions.
36 changes: 3 additions & 33 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,8 @@ services:
- PSQL_DATABASE=${PSQL_DATABASE}
- PSQL_PORT=${PSQL_PORT}
networks:
- postgres_doom-network
- doom-network

networks:
postgres_doom-network:
doom-network:
external: true

# depends_on:
# - db
# db:
# container_name: doom-postgres
# env_file:
# - .env
# build: ./postgres/
# restart: unless-stopped
# ports:
# - "9889:5432"
# volumes:
# - "$HOME/doom-postgres/:/var/lib/postgresql/data"
# environment:
# - POSTGRES_PASSWORD=${PSQL_PASSWORD}
# - POSTGRES_USER=${PSQL_USER}
# grafana:
# container_name: shimada-grafana
# env_file:
# - .env
# image: grafana/grafana-enterprise
# restart: unless-stopped
# ports:
# - '3000:3000'
# environment:
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# - POSTGRES_USER=${POSTGRES_USER}
# volumes:
# - 'grafana_storage:/var/lib/grafana'
#volumes:
# grafana_storage: { }
36 changes: 24 additions & 12 deletions postgres/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: doom-postgres

services:
db:
container_name: doom-postgres
build: .
restart: unless-stopped
ports:
- "5432"
volumes:
- "$HOME/doom-postgres/:/var/lib/postgresql/data"
environment:
Expand All @@ -16,25 +16,37 @@ services:
dbgate:
image: dbgate/dbgate
restart: always
ports:
- 3000:3000
volumes:
- dbgate-data:/root/.dbgate
environment:
CONNECTIONS: psql
SINGLE_CONNECTION: psql
LABEL_psql: Postgres - Doom
SERVER_psql: db
PORT_psql: 5432
PASSWORD_MODE_psql: askUser
ENGINE_psql: postgres@dbgate-plugin-postgres
CONNECTIONS: PSQL
LABEL_PSQL: PostgreSQL - Doom
SERVER_PSQL: db
PASSWORD_MODE_PSQL: askUser
PORT_PSQL: 5432
ENGINE_PSQL: postgres@dbgate-plugin-postgres
networks:
- doom-network
- contabo_network

webdb:
image: webdb/app
restart: always
volumes:
- "$HOME/.webdb:/usr/src/app/static/version"
environment:
- SCAN_HOSTS=db
networks:
- doom-network
- contabo_network


volumes:
dbgate-data:
driver: local

networks:
doom-network:
doom-network:
external: true
contabo_network:
external: true

0 comments on commit 2d29bab

Please sign in to comment.