Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 1.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (69 loc) · 1.57 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
version: '3.8'
services:
greencode-backend:
build: .
container_name: greencode-backend
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/greencode
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=password
- JWT_SECRET=your-secret-key-here-make-it-long-and-secure-in-production
volumes:
- ./logs:/app/logs
- ./data:/app/data
depends_on:
- postgres
- redis
networks:
- greencode-network
restart: unless-stopped
postgres:
image: postgres:15-alpine
container_name: greencode-postgres
environment:
- POSTGRES_DB=greencode
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- greencode-network
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: greencode-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- greencode-network
restart: unless-stopped
adminer:
image: adminer:latest
container_name: greencode-adminer
ports:
- "8081:8080"
environment:
- ADMINER_DEFAULT_SERVER=postgres
depends_on:
- postgres
networks:
- greencode-network
restart: unless-stopped
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
greencode-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16