-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (97 loc) · 2.43 KB
/
docker-compose.yml
File metadata and controls
103 lines (97 loc) · 2.43 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
services:
postgres:
image: postgres:15-alpine
container_name: rukhalt-db
restart: unless-stopped
environment:
POSTGRES_DB: rukhalt_db
POSTGRES_USER: rukhalt_user
POSTGRES_PASSWORD: rukhalt_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-rukhalt_user} -d ${DB_NAME:-rukhalt_db}"]
interval: 5s
timeout: 3s
retries: 5
networks:
- rukhalt-network
redis:
image: redis:7-alpine
container_name: rukhalt-redis
restart: unless-stopped
volumes:
- redis_data:/data
networks:
- rukhalt-network
server:
build:
context: ./server
dockerfile: Dockerfile.dev
container_name: rukhalt-server
restart: unless-stopped
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: rukhalt_db
DB_USER: rukhalt_user
DB_PASSWORD: rukhalt_password
DB_SSL_MODE: disable
JWT_SECRET: dev-jwt-secret-change-in-production
ENCRYPTION_KEY: dev-encryption-key-change-in-production
PORT: 8080
GIN_MODE: debug
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./server:/app
- /app/tmp
- ./backups:/app/backups
- ./logs:/app/logs
networks:
- rukhalt-network
command: sh -c "goose -dir migrations postgres \"host=postgres port=5432 user=rukhalt_user password=rukhalt_password dbname=rukhalt_db sslmode=disable\" up && air -c .air.toml"
client:
build:
context: ./client
dockerfile: Dockerfile.dev
container_name: rukhalt-client
restart: unless-stopped
environment:
- VITE_API_URL=http://localhost:8080/api/v1
ports:
- "3000:3000"
depends_on:
- server
volumes:
- ./client:/app
- /app/node_modules
networks:
- rukhalt-network
# Test PostgreSQL instance for backup testing
postgres-test:
image: postgres:15-alpine
container_name: rukhalt-test-db
restart: unless-stopped
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass123
ports:
- "5433:5432"
volumes:
- postgres_test_data:/var/lib/postgresql/data
networks:
- rukhalt-network
volumes:
postgres_data:
redis_data:
postgres_test_data:
networks:
rukhalt-network:
driver: bridge