| 1 | name: ghost |
| 2 | |
| 3 | services: |
| 4 | postgres: |
| 5 | image: postgres:18-alpine |
| 6 | restart: unless-stopped |
| 7 | environment: |
| 8 | POSTGRES_USER: postgres |
| 9 | POSTGRES_PASSWORD: postgres |
| 10 | POSTGRES_DB: ghost |
| 11 | ports: |
| 12 | - "5432:5432" |
| 13 | volumes: |
| 14 | - postgres:/var/lib/postgresql |
| 15 | healthcheck: |
| 16 | test: ["CMD-SHELL", |
| 17 | interval: 5s |
| 18 | timeout: 5s |
| 19 | retries: 10 |
| 20 | |
| 21 | rustfs: |
| 22 | image: rustfs/rustfs:latest |
| 23 | restart: unless-stopped |
| 24 | environment: |
| 25 | RUSTFS_VOLUMES: /data |
| 26 | RUSTFS_ADDRESS: 0.0.0.0:9000 |
| 27 | RUSTFS_CONSOLE_ADDRESS: 0.0.0.0:9001 |
| 28 | RUSTFS_CONSOLE_ENABLE: "true" |
| 29 | RUSTFS_ACCESS_KEY: ghost |
| 30 | RUSTFS_SECRET_KEY: ghostsecret |
| 31 | ports: |
| 32 | - "9000:9000" # |
| 33 | - "9001:9001" # |
| 34 | volumes: |
| 35 | - rustfs:/data |
| 36 | - rustfs_logs:/logs |
| 37 | healthcheck: |
| 38 | test: ["CMD-SHELL", |
| 39 | interval: 5s |
| 40 | timeout: 5s |
| 41 | retries: 20 |
| 42 | start_period: 20s |
| 43 | |
| 44 | bucket: |
| 45 | image: amazon/aws-cli:latest |
| 46 | depends_on: |
| 47 | rustfs: |
| 48 | condition: service_healthy |
| 49 | environment: |
| 50 | AWS_ACCESS_KEY_ID: ghost |
| 51 | AWS_SECRET_ACCESS_KEY: ghostsecret |
| 52 | AWS_DEFAULT_REGION: auto |
| 53 | entrypoint: ["/bin/sh", |
| 54 | command: |
| 55 | - "aws --endpoint-url http://rustfs:9000 s3api create-bucket --bucket ghost || aws --endpoint-url http://rustfs:9000 s3api head-bucket --bucket ghost" |
| 56 | restart: "no" |
| 57 | |
| 58 | volumes: |
| 59 | postgres: |
| 60 | rustfs: |
| 61 | rustfs_logs: |