-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.22 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
version: '3.8'
services:
postgres:
image: postgres:latest
container_name: newsletter2
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: newsletterdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
retries: 5
backend:
build:
context: ./backend
image: newsletter_backend
container_name: backend
ports:
- "8000:8000"
environment:
DATABASE_URL: postgres://postgres:mysecretpassword@postgres:5432/newsletterdb
depends_on:
postgres:
condition: service_healthy
command: ["sh", "-c", "diesel migration run && /app/newsletter"]
frontend:
build:
context: ./frontend
image: newsletter_frontend
container_name: frontend
ports:
- "5173:5173"
depends_on:
- backend
# Uncomment this if you need MinIO
# minio:
# image: minio/minio
# container_name: minio
# ports:
# - "9000:9000"
# - "9090:9090"
# environment:
# MINIO_ROOT_USER: minioadmin
# MINIO_ROOT_PASSWORD: minioadmin
# volumes:
# - ~/minio/data:/data
# command: server /data --console-address ":9090"