-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
125 lines (125 loc) · 2.84 KB
/
docker-compose.yml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: "3.8"
services:
reverse-proxy:
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedByDefault=false"
ports:
# HTTP Port
- "80:80"
# Web UI
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
postgres-account:
image: "postgres:alpine"
environment:
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
volumes:
- "pgdata_account:/var/lib/postgresql/data"
command:
[
"postgres",
"-c",
"log_statement=mod",
"-c",
"log_min_error_statement=ERROR",
]
redis-account:
image: "redis:alpine"
ports:
- "6379:6379"
volumes:
- "redisdata:/data"
postgres-project:
image: "postgres:alpine"
environment:
- POSTGRES_PASSWORD=password
ports:
- "5433:5432"
volumes:
- "pgdata_project:/var/lib/postgresql/data"
command:
[
"postgres",
"-c",
"log_statement=mod",
"-c",
"log_min_error_statement=ERROR",
]
account-server:
build:
context: ./account-server
target: builder
image: account-server
env_file: ./account-server/.env.dev
expose:
- "8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.account-server.rule=Host(`calpal.test`) && PathPrefix(`/api/account`)"
environment:
- ENV=dev
volumes:
- ./account-server:/go/src/app
depends_on:
- postgres-account
- redis-account
- reverse-proxy
command: reflex -r "\.go$$" -s -- sh -c "go run ./"
account-client:
build:
context: ./account-client
image: account-client
expose:
- "3000"
ports:
- "3000:3000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.account-client.rule=Host(`calpal.test`) && PathPrefix(`/account/`)"
volumes:
- ./account-client:/app
- /app/node_modules
depends_on:
- reverse-proxy
project-server:
build:
context: ./project-server
target: builder
image: project-server
expose:
- "8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.project-server.rule=Host(`calpal.test`) && PathPrefix(`/api`)"
volumes:
- ./project-server:/app
depends_on:
- postgres-project
environment:
- NODE_ENV=development
command: ["npm", "run", "dev"]
project-client:
build:
context: ./project-client
image: project-client
stdin_open: true
expose:
- "3000"
ports:
- "3003:3000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.project-client.rule=Host(`calpal.test`)"
volumes:
- ./project-client:/app
- /app/node_modules
volumes:
pgdata_account:
pgdata_project:
redisdata: