chore(deploy): switch compose to nested app directories
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.env
|
||||
backend/logs/
|
||||
backend/.pytest_cache/
|
||||
|
||||
backend/qlockify-backend-deployment
|
||||
frontend/qlockify-frontend-deployment
|
||||
@@ -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
|
||||
@@ -24,13 +22,13 @@ services:
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
backend:
|
||||
build:
|
||||
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
|
||||
@@ -46,13 +44,13 @@ services:
|
||||
redis:
|
||||
condition: service_started
|
||||
|
||||
celery:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
celery:
|
||||
build:
|
||||
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
|
||||
@@ -64,13 +62,13 @@ services:
|
||||
backend:
|
||||
condition: service_started
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend/qlockify-frontend-deployment
|
||||
dockerfile: ../Dockerfile
|
||||
restart: always
|
||||
env_file:
|
||||
- ./frontend/.env
|
||||
- ./frontend/qlockify-frontend-deployment/.env
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user