-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.69 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
# CodeScout, running with its own Postgres. Start it with:
#
# docker compose up
#
# Then open http://localhost:24275 and create your first account.
#
# To run against your own database instead (RDS, Cloud SQL, an existing Postgres),
# delete the `db` service and point CS_DB_* at it.
services:
app:
# Pulled, not built. With a `build:` block alongside this, Compose builds
# from the local context and only tags it with this name, so `docker compose
# up` compiled Go from source and never touched the published image. That
# also meant this file only worked inside a clone of the repository.
#
# `latest` is the newest released tag. `edge` is whatever is on main, which
# is the right choice for trying an unreleased fix and the wrong one for a
# first run. To build locally instead, see CONTRIBUTING.md.
image: ghcr.io/getcodescout/code_scout:latest
restart: unless-stopped
ports:
- "24275:24275"
environment:
CS_DB_HOST: db
CS_DB_PORT: 5432
CS_DB_USER: code_scout
CS_DB_PASSWORD: change-me
CS_DB_NAME: code_scout
CS_PUBLIC_BASE_URL: http://localhost:24275
depends_on:
db:
condition: service_healthy
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: code_scout
POSTGRES_USER: code_scout
POSTGRES_PASSWORD: change-me
volumes:
- code_scout_data:/var/lib/postgresql/data
healthcheck:
# The app waits for this before starting, so it never races the database.
test: ["CMD-SHELL", "pg_isready -U code_scout -d code_scout"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
volumes:
code_scout_data: