-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# version: '3.8'
services:
# PostgreSQL Database (Optional - disable if using external DB)
# To use with postgres: docker-compose --profile with-postgres up
# To use external DB: docker-compose up (skips postgres)
# postgres:
# image: postgres:15-alpine
# container_name: appvault-postgres
# profiles:
# - with-postgres
# environment:
# POSTGRES_USER: ${DB_USER:-postgres}
# POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
# POSTGRES_DB: ${DB_NAME:-appvault}
# # No ports exposed - only accessible inside docker network
# volumes:
# - postgres_data:/var/lib/postgresql/data
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres}"]
# interval: 5s
# timeout: 5s
# retries: 5
# restart: unless-stopped
# networks:
# - appvault-network
# App Vault API Server
appvault:
build:
context: .
dockerfile: Dockerfile
container_name: appvault-server
env_file:
- .env
environment:
# Database connection - configure these for external DB
DB_HOST: ${DB_HOST:-postgres}
DB_PORT: ${DB_PORT:-5432}
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-postgres}
DB_NAME: ${DB_NAME:-appvault}
DB_SSLMODE: ${DB_SSLMODE:-disable}
ports:
- "${SERVER_PORT:-8888}:8888"
- "${TLS_PORT:-8443}:8443"
restart: unless-stopped
networks:
- appvault-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8888/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Vue 3 Web Frontend
web:
build:
context: ./web
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-/api/v1}
container_name: appvault-web
ports:
- "${WEB_HTTP_PORT:-80}:80"
- "${WEB_HTTPS_PORT:-443}:443"
depends_on:
- appvault
restart: unless-stopped
networks:
- appvault-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
networks:
appvault-network:
driver: bridge
volumes:
postgres_data: