Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (82 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (82 loc) · 1.71 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
version: "3.9"
services:
db:
image: postgres:16-alpine
container_name: greenops-db
restart: unless-stopped
environment:
POSTGRES_USER: greenops
POSTGRES_PASSWORD: greenops
POSTGRES_DB: greenops
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- backend
migrate:
build:
context: .
dockerfile: Dockerfile.migrate
container_name: greenops-migrate
restart: "no"
depends_on:
- db
environment:
POSTGRES_USER: greenops
POSTGRES_PASSWORD: greenops
POSTGRES_DB: greenops
DB_HOST: db
DB_PORT: "5432"
networks:
- backend
server:
build:
context: .
dockerfile: Dockerfile.server
container_name: greenops-server
restart: unless-stopped
depends_on:
- db
- migrate
environment:
DATABASE_URL: postgresql+asyncpg://greenops:greenops@db:5432/greenops
JWT_SECRET_KEY: abcdefghijklmnopqrstuvwxyz1234567890
ENV: production
DEBUG: "false"
networks:
- backend
- frontend
ports:
- "8000:8000"
dashboard:
build:
context: .
dockerfile: Dockerfile.dashboard
container_name: greenops-dashboard
restart: unless-stopped
depends_on:
- server
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: http://localhost:8000
networks:
- frontend
ports:
- "3000:3000"
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
container_name: greenops-nginx
restart: unless-stopped
depends_on:
- server
- dashboard
networks:
- frontend
ports:
- "80:80"
volumes:
postgres_data:
networks:
backend:
frontend: