-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
36 lines (33 loc) · 1.21 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
version: '3.8'
services:
onedev:
image: 1dev/server:8.6.4
container_name: onedev
hostname: onedev
restart: unless-stopped
# ports:
# - 6610:6610/tcp
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${ONEDEV_STORAGE_PATH}/onedev:/opt/onedev
environment:
- initial_user=$INITIAL_USER # only used for init, may change
- initial_password=$INITIAL_PASSWORD # only used for init, may change
- initial_email=$INITIAL_EMAIL # only used for init, may change
- initial_server_url=https://$ONEDEV_URL # adjust
networks:
- proxy
labels:
traefik.enable: true
traefik.http.routers.onedev.entrypoints: https
traefik.http.routers.onedev.rule: "Host(`$ONEDEV_URL`)"
traefik.docker.network: proxy # Specify which network to use for traefik, since there are multiple network defined
traefik.tcp.routers.onedev-ssh.entrypoints: ssh
traefik.tcp.routers.onedev-ssh.rule: HostSNI(`*`)
traefik.tcp.routers.onedev-ssh.service: onedev-ssh-svc
traefik.tcp.services.onedev-ssh-svc.loadbalancer.server.port: 22
networks:
proxy:
external: true