-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (35 loc) · 1.2 KB
/
docker-compose.yml
File metadata and controls
36 lines (35 loc) · 1.2 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
services:
xray:
image: teddysun/xray:latest
restart: always
ports:
- "443:443"
volumes:
- ./config.json:/etc/xray/config.json
- ./logs:/logs
- /etc/localtime:/etc/localtime:ro
environment:
- TZ=${TZ} # Timezone
- UUID=${UUID} # Reference UUID from .env file
- PRIVATE_KEY=${PRIVATE_KEY} # Reference private key from .env file
- SERVER_NAME=${SERVER_NAME} # Reference server name from .env file
- SHORT_IDS=${SHORT_IDS} # Reference shortIds from .env file
command: /bin/sh -c "apk add --no-cache gettext procps && envsubst < /etc/xray/config.json > /etc/xray/config.run.json && xray run -config /etc/xray/config.run.json"
healthcheck:
test: [ "CMD", "pgrep", "xray" ]
interval: 5s
timeout: 5s
retries: 5
labels:
- "com.centurylinklabs.watchtower.enable=true"
watchtower:
image: nickfedor/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_SCHEDULE=${WATCHTOWER_SCHEDULE} # Reference update schedule
- TZ=${TZ}
command: --no-color --cleanup --label-enable
labels:
- "com.centurylinklabs.watchtower.enable=true"