Skip to content

Commit

Permalink
Update docker-compose example in the getting started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Dec 2, 2023
1 parent 79578f5 commit b09af44
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,32 @@ asciinema server is packaged as OCI container image and is available at
Here's a minimal docker-compose example:

```yaml title="docker-compose.yml"
version: '2'

services:
asciinema-server:
image: ghcr.io/asciinema/asciinema-server:latest
# links:
# - postgres
asciinema:
image: ghcr.io/asciinema/asciinema-server:latest
ports:
- '4000:4000'
volumes:
- ./volumes/asciinema/uploads:/opt/app/uploads
- asciinema-data:/var/opt/asciinema
depends_on:
postgres:
condition: service_healthy

postgres:
image: postgres:14
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 2s
timeout: 5s
retries: 10

volumes:
asciinema-data:
postgres-data:
```
Start it with:
Expand All @@ -206,7 +216,7 @@ asciinema upload demo.cast
```

Note that the above configuration should be used only for testing the server
locally. See full [server self-hosting
locally. See full [server self-hosting
guide](manual/server/self-hosting/index.md) to learn how to set it up properly
in a full-featured and secure way.

Expand Down

0 comments on commit b09af44

Please sign in to comment.