chore(deploy): switch compose to nested app directories

This commit is contained in:
2026-04-29 15:57:54 +03:30
parent 8b6f25e068
commit 8ab01bd5b7
3 changed files with 21 additions and 31 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
.env
backend/logs/
backend/.pytest_cache/
backend/qlockify-backend-deployment
frontend/qlockify-frontend-deployment

View File

@@ -3,13 +3,11 @@ services:
image: postgres:18-alpine
restart: always
env_file:
- .env
- ./backend/qlockify-backend-deployment/.env
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres/custom-postgresql.conf:/etc/postgresql/postgresql.conf:ro
- ./postgres/pg_hba.conf:/var/lib/postgresql/data/pg_hba.conf:ro
command: postgres -c config_file=/etc/postgresql/postgresql.conf
command: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
@@ -26,11 +24,11 @@ services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
context: ./backend/qlockify-backend-deployment
dockerfile: ../Dockerfile
restart: always
env_file:
- ./backend/.env
- ./backend/qlockify-backend-deployment/.env
volumes:
- static_data:/app/staticfiles
- media_data:/app/mediafiles
@@ -48,11 +46,11 @@ services:
celery:
build:
context: ./backend
dockerfile: Dockerfile
context: ./backend/qlockify-backend-deployment
dockerfile: ../Dockerfile
restart: always
env_file:
- ./backend/.env
- ./backend/qlockify-backend-deployment/.env
volumes:
- media_data:/app/mediafiles
command: celery -A config worker -l INFO
@@ -66,11 +64,11 @@ services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
context: ./frontend/qlockify-frontend-deployment
dockerfile: ../Dockerfile
restart: always
env_file:
- ./frontend/.env
- ./frontend/qlockify-frontend-deployment/.env
expose:
- "80"

View File

@@ -1,11 +0,0 @@
# TYPE DATABASE USER ADDRESS METHOD
local all all scram-sha-256
host all all 127.0.0.1/32 scram-sha-256
# Allow Docker containers to connect (Standard Docker bridge subnets)
host all all 172.16.0.0/12 scram-sha-256
host all all 192.168.0.0/16 scram-sha-256
# Reject everything else
host all all 0.0.0.0/0 reject
host all all ::/0 reject