Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
upd(backend, deployment): better configs
Browse files Browse the repository at this point in the history
now ports are exposed only at local configuration

add docker watch
  • Loading branch information
yogrr committed Jun 13, 2024
1 parent b661c64 commit 7b3335d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .docker/compose.app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
ports:
- ${BACKEND_HOST_PORT:-80}:8000
networks:
- backend-net
4 changes: 0 additions & 4 deletions .docker/compose.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ services:
networks:
- backend-net
platform: linux/amd64
ports:
- ${POSTGRES_PORT}:5432
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data/
Expand Down Expand Up @@ -56,8 +54,6 @@ services:
networks:
- backend-net
platform: linux/amd64
ports:
- ${PGADMIN_HOST_PORT:-8080}:80
restart: unless-stopped


38 changes: 38 additions & 0 deletions .docker/compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
include:
- ./compose.db-env.yml

services:
backend:
extends:
file: ./compose.app.yml
service: backend
depends_on:
- db
- pgadmin
develop:
watch:
# for only frontend container (docker compose up from project's root directory)
- action: sync
path: ./../backend/src/
target: /app/src/

# for only backend container (docker compose up from backend's root directory)
- action: sync
path: ./src/
target: /app/src/
ports:
- ${BACKEND_HOST_PORT:-80}:8000

db:
extends:
file: ./compose.db.yml
service: db
ports:
- ${POSTGRES_PORT}:5432

pgadmin:
extends:
file: ./compose.db.yml
service: pgadmin
ports:
- ${PGADMIN_HOST_PORT:-8080}:80

0 comments on commit 7b3335d

Please sign in to comment.