-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (92 loc) · 2.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (92 loc) · 2.61 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
91
92
93
name: "attune"
services:
controlplane:
build:
context: .
dockerfile: ./docker/attune/Dockerfile
ports:
- "3000:3000"
env_file: ./.env
environment:
- ATTUNE_DATABASE_URL=postgres://attune:attune@postgres:5432/attune
- AWS_ENDPOINT_URL_S3=http://minio:9000
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v0/health"]
interval: 1s
timeout: 5s
networks:
- dev
postgres:
image: postgres:18.1-trixie
environment:
- POSTGRES_USER=attune
- POSTGRES_PASSWORD=attune
- POSTGRES_DB=attune
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "attune"]
interval: 3s
timeout: 2s
retries: 5
networks:
- dev
migrate:
build:
context: ./docker/migrate
dockerfile: Dockerfile
environment:
- ATTUNE_DATABASE_URL=postgres://attune:attune@postgres:5432/attune
working_dir: /app
# If you're using IAM authentication with RDS Postgres, you can use
# `migrate:rds` instead of `migrate` to get the database password from IMDS:
#
# command: ["migrate:rds"]
command: ["migrate"]
depends_on:
postgres:
condition: service_healthy
networks:
- dev
restart: on-failure
minio:
build: ./docker/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=attuneminio
- MINIO_ROOT_PASSWORD=attuneminio
# This MINIO_DOMAIN variable needs to be set to the hostname that you're
# using to access MinIO. From containers within the Docker Compose
# network, this is `minio`. However, if you're developing the control
# plane on your host machine and just using Docker Compose to run the
# backing services, you're probably going to be accessing MinIO at
# `localhost`, so you'll need to set MINIO_DOMAIN to `localhost`.
- MINIO_DOMAIN=minio
# - MINIO_DOMAIN=localhost
volumes:
- ./minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 3s
timeout: 2s
retries: 5
networks:
dev:
aliases:
# By default, subdomains are not resolved to the service. Here, we
# explicitly add the subdomain of the S3 bucket because we're using
# vhost-style S3 requests.
- attune-dev-0.minio
networks:
dev: