Skip to content

Commit

Permalink
feat(config): simplify service and dependency definitions for improve…
Browse files Browse the repository at this point in the history
…d readability
  • Loading branch information
yarlson committed Jan 19, 2025
1 parent 933b4e2 commit 2a76b65
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,29 @@ project:

server:
host: my-project.example.com
port: 22
user: my-project
ssh_key: ~/.ssh/id_rsa

services:
- name: web
image: my-app:latest
path: ./src
port: 80
health_check:
path: /
interval: 10s
timeout: 5s
retries: 3
routes:
- path: /
strip_prefix: false

dependencies:
- name: postgres
image: postgres:16
- "postgres:16" # Using short notation
- name: redis # Using detailed definition
image: redis:7
volumes:
- postgres_data:/var/lib/postgresql/data
- redis_data:/custom/redis/path
env:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-app}
- REDIS_PASSWORD=${REDIS_PASSWORD:-secret}

volumes:
- postgres_data
- redis_data
```
### Environment Variables
Expand All @@ -117,9 +111,7 @@ FTL supports two deployment modes:
```yaml
services:
- name: web
build:
context: .
dockerfile: Dockerfile
path: ./src # Path to directory containing Dockerfile
```

2. Registry-based Deployment:
Expand All @@ -128,9 +120,7 @@ services:
services:
- name: web
image: registry.example.com/my-app:latest
build:
context: .
dockerfile: Dockerfile
path: ./src
```

Build command:
Expand Down

0 comments on commit 2a76b65

Please sign in to comment.