Skip to content

Commit

Permalink
Merge pull request #48 from davidjnevin/main
Browse files Browse the repository at this point in the history
Adding docker-compose and docker-compose-portainer
  • Loading branch information
davidjnevin authored Feb 9, 2024
2 parents 048ba58 + d3acec7 commit aaf5c86
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
49 changes: 49 additions & 0 deletions docker-compose-portainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: '3.9'

services:
chat-cleaner-app:
container_name: chat-cleaner-app-container
build:
dockerfile: dockerfiles/Dockerfile
context: .
env_file:
- ./.env
command: server
ports:
- 8000:8000
depends_on:
- chat-cleaner-db
volumes:
- .:/app
- postgres_socket:/var/run/postgresql
networks:
- nginx_default

n chat-cleaner-db:
container_name: chat-cleaner-db-container
image: postgres
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data/
- postgres_socket:/var/run/postgresql/
healthcheck:
test: pg_isready -q --username=$$POSTGRES_USER --dbname=$$POSTGRES_DB
timeout: 45s
interval: 10s
retries: 10
restart: always
ports:
- "54321:5432"
networks:
- nginx_default

volumes:
postgres_data:
postgres_socket:

networks:
nginx_default:
external: true
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ services:
- .:/app
- postgres_socket:/var/run/postgresql
networks:
- nginx_default
- backend

n chat-cleaner-db:
chat-cleaner-db:
container_name: chat-cleaner-db-container
image: postgres
environment:
Expand All @@ -38,12 +38,11 @@ n chat-cleaner-db:
ports:
- "54321:5432"
networks:
- nginx_default
- backend

volumes:
postgres_data:
postgres_socket:

networks:
nginx_default:
external: true
backend:

0 comments on commit aaf5c86

Please sign in to comment.