-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
41 lines (39 loc) · 1.08 KB
/
docker-compose.yaml
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
services:
goshort:
build:
context: .
dockerfile: Dockerfile
container_name: goshort
ports:
- "8081:80" # Frontend
environment:
DATABASE_URL: postgres://goshort:goshort_password@database:5432/goshort?sslmode=disable
# Branding customization (optional)
BRAND_TITLE: "GoShort - URL Shortener"
BRAND_DESCRIPTION: "A fast and customizable URL shortener"
BRAND_THEME_COLOR: "#4caf50"
BRAND_PRIMARY_COLOR: "#3b82f6"
BRAND_SECONDARY_COLOR: "#10b981"
BRAND_HEADER_TITLE: "GoShort - URL Shortener"
depends_on:
database:
condition: service_healthy
database:
image: postgres:17-bullseye
container_name: goshort_db
restart: always
environment:
POSTGRES_USER: goshort
POSTGRES_PASSWORD: goshort_password
POSTGRES_DB: goshort
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U goshort -d goshort"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: