-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
97 lines (91 loc) · 2.46 KB
/
docker-compose.dev.yml
File metadata and controls
97 lines (91 loc) · 2.46 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
# Development docker-compose with hot reload
# Usage: docker compose -f docker-compose.dev.yml up
services:
# PostgreSQL for user management
postgres:
image: postgres:16-alpine
container_name: messenger-postgres-dev
ports:
- "5432:5432"
environment:
POSTGRES_USER: messenger
POSTGRES_PASSWORD: messenger_secret
POSTGRES_DB: messenger
volumes:
- postgres-data-dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U messenger"]
interval: 5s
timeout: 5s
retries: 5
# Gotify push notification server
gotify:
image: gotify/server:latest
container_name: gotify-server-dev
ports:
- "8080:80"
environment:
- GOTIFY_DEFAULTUSER_NAME=admin
- GOTIFY_DEFAULTUSER_PASS=admin
volumes:
- gotify-data-dev:/app/data
# Gotify Secure Messenger with hot reload
messenger:
build:
context: .
dockerfile: Dockerfile.dev
container_name: gotify-messenger-dev
ports:
- "8081:8081"
environment:
# Gotify settings
- GOTIFY_URL=http://gotify:80
- GOTIFY_ADMIN_USER=admin
- GOTIFY_ADMIN_PASS=admin
- APP_TOKEN=${APP_TOKEN:-}
- CLIENT_TOKEN=${CLIENT_TOKEN:-}
# User settings
- USER_ID=${USER_ID:-user1}
- USERNAME=${USERNAME:-User}
# App mode
- WEB_MODE=true
- USE_DB=true
# PostgreSQL settings
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=messenger
- POSTGRES_PASSWORD=messenger_secret
- POSTGRES_DB=messenger
# Message store settings
- MESSAGE_STORE_PATH=/app/data/messages
- MESSAGE_STORE_TYPE=rocksdb
# Admin settings - set this to a username to make them admin on registration
- INITIAL_ADMIN_USER=${INITIAL_ADMIN_USER:-}
volumes:
# Mount source code for hot reload
- .:/app
# Exclude node_modules and tmp from mount (use container's version)
- /app/node_modules
- /app/tmp
# Persist data
- messenger-data-dev:/app/data
depends_on:
postgres:
condition: service_healthy
gotify:
condition: service_started
# Keep stdin open for Air
stdin_open: true
tty: true
# Adminer for database management
adminer:
image: adminer:latest
container_name: messenger-adminer-dev
ports:
- "8082:8080"
depends_on:
- postgres
volumes:
postgres-data-dev:
gotify-data-dev:
messenger-data-dev: