-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
106 lines (96 loc) · 2.79 KB
/
docker-compose.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
volumes:
atuin_caddy_data:
external: true
atuin_db_data:
external: true
# Use this, if using bind mount
# atuin_db_data:
# driver: local
# driver_opts:
# type: none
# o: bind
# device: "${PWD}/postgresql"
atuin_config:
external: true
# Use this, if using bind mount
# atuin_config:
# driver: local
# driver_opts:
# type: none
# o: bind
# device: "${PWD}/config"
networks:
atuin_net:
driver: bridge
attachable: true
services:
# Caddy ---------------------------------------------------------------------
caddy:
image: caddy:alpine
pull_policy: always
restart: unless-stopped
ports:
- 80:80
- 443:443
environment:
TLS_DOMAINS: "${TLS_DOMAINS:?TLS_DOMAINS not set}"
ADMIN_EMAIL: "${ADMIN_EMAIL:?ADMIN_EMAIL not set}"
CADDY_TLS: "${CADDY_TLS}"
networks:
- atuin_net
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
logging:
options:
max-size: ${DOCKER_LOGGING_MAX_SIZE:?DOCKER_LOGGING_MAX_SIZE not set}
max-file: ${DOCKER_LOGGING_MAX_FILE:?DOCKER_LOGGING_MAX_FILE not set}
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "127.0.0.1:2019/metrics"]
interval: 10s
retries: 3
start_period: 5s
timeout: 5s
atuin:
restart: always
image: ghcr.io/atuinsh/atuin:${ATUIN_VERSION:?ATUIN_VERSION not set}
command: server start
volumes:
- atuin_config:/config/"
# ports:
# - 8888:8888
networks:
- atuin_net
environment:
ATUIN_HOST: ${ATUIN_HOST:?ATUIN_HOST not set}
ATUIN_OPEN_REGISTRATION: "true"
ATUIN_DB_URI: postgres://${ATUIN_DB_USERNAME}:${ATUIN_DB_PASSWORD}@postgresql/${ATUIN_DB_NAME}
RUST_LOG: info,atuin_server=debug
# ATUIN_CONFIG_DIR: /path/to/config/dir/
depends_on:
postgresql:
condition: service_healthy
logging:
options:
max-size: ${DOCKER_LOGGING_MAX_SIZE:?DOCKER_LOGGING_MAX_SIZE not set}
max-file: ${DOCKER_LOGGING_MAX_FILE:?DOCKER_LOGGING_MAX_FILE not set}
postgresql:
image: postgres:16
restart: unless-stopped
networks:
- atuin_net
volumes:
- atuin_db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${ATUIN_DB_USERNAME}
POSTGRES_PASSWORD: ${ATUIN_DB_PASSWORD}
POSTGRES_DB: ${ATUIN_DB_NAME}
logging:
options:
max-size: ${DOCKER_LOGGING_MAX_SIZE:?DOCKER_LOGGING_MAX_SIZE not set}
max-file: ${DOCKER_LOGGING_MAX_FILE:?DOCKER_LOGGING_MAX_FILE not set}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${ATUIN_DB_USERNAME:?ATUIN_DB_USERNAME not set} -d ${ATUIN_DB_NAME:?ATUIN_DB_NAME not set}"]
interval: 10s
retries: 5
start_period: 5s
timeout: 5s