-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (87 loc) · 2.07 KB
/
docker-compose.yml
File metadata and controls
89 lines (87 loc) · 2.07 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
services:
backend:
build:
context: backend
dockerfile: Dockerfile
container_name: notes_backend
ports:
- '5100:5100'
env_file:
- backend/.env
depends_on:
postgres:
condition: service_healthy
networks:
- notes-network
environment:
DATABASE_URL: postgresql://notes:notes@postgres:5432/notes
frontend:
build:
context: frontend
dockerfile: Dockerfile
args:
HOSTING_MODE: "${HOSTING_MODE:-self}"
HCAPTCHA_SITE_KEY: "${HCAPTCHA_SITE_KEY:-}"
container_name: notes_frontend
ports:
- '8080:80'
depends_on:
- backend
networks:
- notes-network
postgres:
image: postgres:16
container_name: notes_postgres
volumes:
- ~/.db_data/notes:/var/lib/postgresql/data
environment:
POSTGRES_USER: notes
POSTGRES_PASSWORD: notes
POSTGRES_DB: notes
ports:
- '5432:5432'
restart: 'no'
networks:
- notes-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U notes"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
minio:
image: pgsty/minio:latest
container_name: notes_minio
ports:
- '9000:9000'
- '9001:9001'
environment:
MINIO_ROOT_USER: minio-admin
MINIO_ROOT_PASSWORD: minio-admin
volumes:
- ~/.db_data/notes_minio:/data
networks:
- notes-network
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:9000/minio/health/ready || exit 1"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
minio-setup:
image: pgsty/mc:latest
container_name: notes_minio_setup
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command: >-
"mc alias set local http://minio:9000 minio-admin minio-admin &&
(mc ls local/ciphernotes || mc mb -p local/ciphernotes || true)"
restart: "no"
networks:
- notes-network
networks:
notes-network:
driver: bridge