Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
150 lines (145 loc) · 6.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
150 lines (145 loc) · 6.27 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
postgres:
image: postgres:16-alpine
container_name: insightful-phish-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-insightful_phish}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your local .env file or shell.}
POSTGRES_DB: ${POSTGRES_DB:-insightful_phish_dev}
ports:
- '${POSTGRES_PORT:-5432}:5432'
volumes:
- insightful_phish_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: apps/backend/Dockerfile
container_name: insightful-phish-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: development
PORT: 4000
DATABASE_URL: postgresql://${POSTGRES_USER:-insightful_phish}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your local .env file or shell.}@postgres:5432/${POSTGRES_DB:-insightful_phish_dev}
FRONTEND_ORIGIN: ${FRONTEND_ORIGIN:-http://localhost:5173}
PUBLIC_API_ORIGIN: ${PUBLIC_API_ORIGIN:-http://localhost:4000}
SMTP_HOST: ${SMTP_HOST:-mailpit}
SMTP_PORT: ${SMTP_PORT:-1025}
SMTP_SECURE: ${SMTP_SECURE:-false}
SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS:-noreply@insightful-phish.local}
SMTP_FROM_NAME: ${SMTP_FROM_NAME:-Insightful Phish}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
INFISICAL_CLIENT_ID: ${INFISICAL_CLIENT_ID:-}
INFISICAL_CLIENT_SECRET: ${INFISICAL_CLIENT_SECRET:-}
INFISICAL_PROJECT_ID: ${INFISICAL_PROJECT_ID:-}
INFISICAL_ENVIRONMENT: ${INFISICAL_ENVIRONMENT:-dev}
CLOUDFLARE_ACCOUNT_ID: ${CLOUDFLARE_ACCOUNT_ID:-}
CLOUDFLARE_WORKERS_AI_API_TOKEN: ${CLOUDFLARE_WORKERS_AI_API_TOKEN:-}
CLOUDFLARE_AI_MODEL: ${CLOUDFLARE_AI_MODEL:-@cf/meta/llama-3.3-70b-instruct-fp8-fast}
CLOUDFLARE_AI_TIMEOUT_MS: ${CLOUDFLARE_AI_TIMEOUT_MS:-120000}
DEMO3_TRAINING_CONTENT_DIR: ${DEMO3_TRAINING_CONTENT_DIR:-}
AUTH_TOKEN_SECRET: ${AUTH_TOKEN_SECRET:?Set AUTH_TOKEN_SECRET in your local .env file or shell.}
SIMULATION_PUBLIC_ORIGINS: ${SIMULATION_PUBLIC_ORIGINS:-}
PHISHING_SIMULATION_FROM_ADDRESS: ${PHISHING_SIMULATION_FROM_ADDRESS:-simulation@insightful-phish.local}
PHISHING_SIMULATION_FROM_NAME: ${PHISHING_SIMULATION_FROM_NAME:-Insightful Phish Simulation}
ports:
- '${BACKEND_PORT:-4000}:4000'
command: sh -c "pnpm prisma:migrate:deploy && pnpm start"
volumes:
- ${DEMO3_SEED_BUNDLE_DIR:-demo3_seed_bundle_unavailable}:/app/.project_planning/demo3-seed:ro
frontend:
build:
context: .
dockerfile: apps/frontend/Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:4000}
VITE_FRONTEND_ORIGIN: ${FRONTEND_ORIGIN:-http://localhost:5173}
container_name: insightful-phish-frontend
restart: unless-stopped
depends_on:
- backend
ports:
- '${FRONTEND_PORT:-5173}:8080'
workspace:
build:
context: .
dockerfile: Dockerfile.workspace
working_dir: /workspace
profiles:
- tools
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: development
LOCAL_UID: ${LOCAL_UID:-1000}
LOCAL_GID: ${LOCAL_GID:-1000}
DATABASE_URL: postgresql://${POSTGRES_USER:-insightful_phish}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your local .env file or shell.}@postgres:5432/${POSTGRES_DB:-insightful_phish_dev}
DEMO_SEED_PASSWORD: ${DEMO_SEED_PASSWORD:-}
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:4000}
TEST_DATABASE_URL: postgresql://${POSTGRES_USER:-insightful_phish}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your local .env file or shell.}@postgres:5432/insightful_phish_test
AUTH_BOOTSTRAP_SUPER_ADMIN_EMAIL: ${AUTH_BOOTSTRAP_SUPER_ADMIN_EMAIL:-}
AUTH_BOOTSTRAP_SUPER_ADMIN_PASSWORD: ${AUTH_BOOTSTRAP_SUPER_ADMIN_PASSWORD:-}
AUTH_BOOTSTRAP_SUPER_ADMIN_NAME: ${AUTH_BOOTSTRAP_SUPER_ADMIN_NAME:-}
SMTP_HOST: ${SMTP_HOST:-mailpit}
SMTP_PORT: ${SMTP_PORT:-1025}
SMTP_SECURE: ${SMTP_SECURE:-false}
SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS:-noreply@insightful-phish.local}
SMTP_FROM_NAME: ${SMTP_FROM_NAME:-Insightful Phish}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
INFISICAL_CLIENT_ID: ${INFISICAL_CLIENT_ID:-}
INFISICAL_CLIENT_SECRET: ${INFISICAL_CLIENT_SECRET:-}
INFISICAL_PROJECT_ID: ${INFISICAL_PROJECT_ID:-}
INFISICAL_ENVIRONMENT: ${INFISICAL_ENVIRONMENT:-dev}
AUTH_TOKEN_SECRET: ${AUTH_TOKEN_SECRET:?Set AUTH_TOKEN_SECRET in your local .env file or shell.}
PHISHING_SIMULATION_FROM_ADDRESS: ${PHISHING_SIMULATION_FROM_ADDRESS:-simulation@insightful-phish.local}
PHISHING_SIMULATION_FROM_NAME: ${PHISHING_SIMULATION_FROM_NAME:-Insightful Phish Simulation}
volumes:
- .:/workspace
- workspace_node_modules:/workspace/node_modules
- backend_node_modules:/workspace/apps/backend/node_modules
- frontend_node_modules:/workspace/apps/frontend/node_modules
- shared_node_modules:/workspace/packages/shared/node_modules
ports:
- '5555:5555'
command: sh
test-db-setup:
image: postgres:16-alpine
profiles:
- tools
depends_on:
postgres:
condition: service_healthy
environment:
PGPASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in your local .env file or shell.}
POSTGRES_USER: ${POSTGRES_USER:-insightful_phish}
TEST_DATABASE_NAME: insightful_phish_test
command:
- sh
- -c
- |
psql -h postgres -U "$$POSTGRES_USER" -d postgres -tc "SELECT 1 FROM pg_database WHERE datname = '$$TEST_DATABASE_NAME'" | grep -q 1 || createdb -h postgres -U "$$POSTGRES_USER" "$$TEST_DATABASE_NAME"
mailpit:
image: axllent/mailpit:latest
container_name: insightful-phish-mailpit
restart: unless-stopped
ports:
- '${MAILPIT_SMTP_PORT:-1025}:1025'
- '${MAILPIT_WEB_PORT:-8025}:8025'
volumes:
insightful_phish_postgres_data:
workspace_node_modules:
backend_node_modules:
frontend_node_modules:
shared_node_modules:
demo3_seed_bundle_unavailable: