forked from getlago/lago
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
182 lines (172 loc) · 6.68 KB
/
docker-compose.dev.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
version: "3.8"
volumes:
front_node_modules:
front_dist:
postgres_data:
redis_data:
services:
traefik:
image: "traefik:v2.5.4"
container_name: lago_traefik
ports:
- 80:80
- 443:443
volumes:
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
- ./traefik/dynamic.yml:/etc/traefik/dynamic.yml
- ./traefik/certs:/etc/certs
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.lago.dev`)"
- "traefik.http.routers.traefik.entrypoints=web,websecure"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
db:
image: postgres:14.0-alpine
container_name: lago_db
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-lago}
POSTGRES_USER: ${POSTGRES_USER:-lago}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
volumes:
- postgres_data:/data/postgres
ports:
- 5432:5432
redis:
image: redis:6.2-alpine
container_name: lago_redis
restart: unless-stopped
volumes:
- redis_data:/data
ports:
- 6379:6379
front:
image: front
container_name: lago_front
stdin_open: true
restart: unless-stopped
build:
context: ./front
dockerfile: $LAGO_PATH/front/Dockerfile.dev
volumes:
- $LAGO_PATH/front:/app:delegated
- front_node_modules:/app/node_modules:delegated
- front_dist:/app/dist:delegated
environment:
- NODE_ENV=development
- API_URL=https://api.lago.dev
- APP_DOMAIN=https://app.lago.dev
- CODEGEN_API=https://api.lago.dev:3000
- LAGO_DISABLE_SIGNUP=${LAGO_DISABLE_SIGNUP:-}
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`app.lago.dev`)"
- "traefik.http.routers.app.entrypoints=web,ws,websecure"
- "traefik.http.routers.app.tls=true"
- "traefik.http.services.app.loadbalancer.server.port=8080"
api:
image: api
container_name: lago_api
restart: unless-stopped
command: ["./scripts/start.dev.sh"]
build:
context: ./api
dockerfile: $LAGO_PATH/api/Dockerfile.dev
volumes:
- $LAGO_PATH/api:/app:delegated
environment:
- LAGO_API_URL=https://api.lago.dev
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- LAGO_FRONT_URL=${FRONT_URL:-https://app.lago.dev}
- ENCRYPTION_PRIMARY_KEY=${ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
- ENCRYPTION_DETERMINISTIC_KEY=${ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
- ENCRYPTION_KEY_DERIVATION_SALT=${ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
- LAGO_USE_AWS_S3=${LAGO_USE_AWS_S3:-false}
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://redis:6379
- SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY:-}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT:-}
- LAGO_LICENSE=${LAGO_LICENSE:-}
- LAGO_FROM_EMAIL=${LAGO_FROM_EMAIL:[email protected]}
labels:
- "traefik.enable=true"
- "traefik.http.routers.api_http.rule=Host(`api.lago.dev`)"
- "traefik.http.routers.api_http.entrypoints=web"
- "traefik.http.routers.api_http.service=api_http"
- "traefik.http.services.api_http.loadbalancer.server.port=3000"
- "traefik.http.routers.api.rule=Host(`api.lago.dev`)"
- "traefik.http.routers.api.entrypoints=websecure"
- "traefik.http.routers.api.service=api"
- "traefik.http.routers.api.tls=true"
- "traefik.http.services.api.loadbalancer.server.port=3000"
api-worker:
image: api
container_name: lago_api_worker
restart: unless-stopped
command: ["./scripts/start.worker.dev.sh"]
build:
context: ./api
dockerfile: $LAGO_PATH/api/Dockerfile.dev
volumes:
- $LAGO_PATH/api:/app:delegated
environment:
- LAGO_API_URL=https://api.lago.dev
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- ENCRYPTION_PRIMARY_KEY=${ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
- ENCRYPTION_DETERMINISTIC_KEY=${ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
- ENCRYPTION_KEY_DERIVATION_SALT=${ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
- LAGO_USE_AWS_S3=${LAGO_USE_AWS_S3:-false}
- LAGO_FRONT_URL=${FRONT_URL:-https://app.lago.dev}
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://redis:6379
- SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY:-}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT:-}
- LAGO_FROM_EMAIL=${LAGO_FROM_EMAIL:[email protected]}
api-clock:
image: api
container_name: lago_api_clock
restart: unless-stopped
command: ["./scripts/start.clock.dev.sh"]
build:
context: ./api
dockerfile: $LAGO_PATH/api/Dockerfile.dev
volumes:
- $LAGO_PATH/api:/app:delegated
environment:
- LAGO_API_URL=https://api.lago.dev
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
- ENCRYPTION_PRIMARY_KEY=${ENCRYPTION_PRIMARY_KEY:-your-encrpytion-primary-key}
- ENCRYPTION_DETERMINISTIC_KEY=${ENCRYPTION_DETERMINISTIC_KEY:-your-encrpytion-deterministic-key}
- ENCRYPTION_KEY_DERIVATION_SALT={ENCRYPTION_KEY_DERIVATION_SALT:-your-encrpytion-derivation-salt}
- SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY:-}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT:-}
pdf:
image: getlago/lago-gotenberg:7
command:
- "gotenberg"
- "--log-level=debug"
labels:
- "traefik.enable=true"
- "traefik.http.routers.pdf.rule=Host(`pdf.lago.dev`)"
- "traefik.http.routers.pdf.entrypoints=web,websecure"
- "traefik.http.routers.pdf.tls=true"
- "traefik.http.services.pdf.loadbalancer.server.port=3000"
mailhog:
image: mailhog/mailhog
container_name: lago_mailhog
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.mail.rule=Host(`mail.lago.dev`)"
- "traefik.http.routers.mail.entrypoints=websecure"
- "traefik.http.routers.mail.tls=true"
- "traefik.http.services.mail.loadbalancer.server.port=8025"