-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (49 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
51 lines (49 loc) · 1.5 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
# Development and testing docker-compose.yml
#
# This file is for roji development and testing ONLY.
# For production use, install roji as a native binary:
# curl -fsSL https://raw.githubusercontent.com/kan/roji/v1.0.0/install.sh | bash
#
# Usage:
# 1. Generate certificates with mkcert:
# mkcert -install
# mkcert -cert-file certs/cert.pem -key-file certs/key.pem "*.dev.localhost" dev.localhost localhost 127.0.0.1
#
# 2. Copy env file and customize if needed:
# cp .env.example .env
#
# 3. Start development server with hot reload:
# docker compose up
services:
roji:
build:
context: .
target: development
container_name: roji-dev
network_mode: host
volumes:
# Mount source code for hot reload
- .:/app
# Docker socket for container discovery (read-only)
- /var/run/docker.sock:/var/run/docker.sock:ro
# TLS certificates
- ./certs:/certs
# Persistent data (project history)
- ./data:/data
# Persist Go build cache for faster rebuilds
- go-build-cache:/root/.cache/go-build
environment:
# Defaults; override via .env file
ROJI_NETWORK: ${ROJI_NETWORK:-roji}
ROJI_DOMAIN: ${ROJI_DOMAIN:-dev.localhost}
ROJI_CERTS_DIR: /certs
ROJI_DATA_DIR: /data
ROJI_DASHBOARD: ${ROJI_DASHBOARD:-roji.dev.localhost}
ROJI_LOG_LEVEL: ${ROJI_LOG_LEVEL:-debug}
labels:
- "roji.self=true"
# Useful for debugging
tty: true
stdin_open: true
volumes:
go-build-cache: