Last active 1731942902

My docker compose configuration for running Pelican Panel & Wings.

Revision 71cb01d2ae387586cf0b8a1fe2e6d843506ebf06

.env Raw
1BASE_PATH=/var/lib/pelican # Path has to be absolute, else wings won't work.
2TIMEZONE=Europe/London
3
4# network
5NETWORK_NAME=wings
6NETWORK_SUBNET=192.30.0.0/16
7NETWORK_GATEWAY=192.30.0.1
8
9# traefik
10TRAEFIK_IMAGE=traefik:3.2
11TRAEFIK_NETWORK_NAME=traefik
12TRAEFIK_PORT=80
13
14# database
15DATABASE_TYPE=mariadb
16DATABASE_IMAGE=mariadb:11.5.2
17DATABASE_PORT=3306
18DATABASE_NAME=pelican
19DATABASE_USER=pelican
20DATABASE_PASS=P6i4hh6L5Q # Needs to be changed.
21DATABASE_ROOT_PASS=lhu2bgjY5b # Needs to be changed.
22
23# redis
24REDIS_IMAGE=redis:7.4.1-alpine
25REDIS_PORT=6379
26
27# panel
28PANEL_TRAEFIK_NAME=pelican-panel
29PANEL_IMAGE=ghcr.io/pelican-dev/panel:v1.0.0-beta11
30PANEL_URL_SCHEME=https # Needs to be changed.
31PANEL_URL=pelican.example.org # Needs to be changed.
32PANEL_PORT=80
33PANEL_PATH=/pelican-data
34DEBUG=false
35NAME=Pelican
36EMAIL=pelican@example.org # Needs to be changed.
37TRUSTED_PROXIES=*
38TOP_NAVIGATION=true
39CLIENT_ALLOCATIONS=false
40EDITABLE_SERVER_DESCRIPTIONS=false
41BINARY_PREFIX=false
42BACKUP_THROTTLE_LIMIT=5
43BACKUP_THROTTLE_PERIOD=120
44REQUEST_TIMEOUT=60
45CONNECT_TIMEOUT=60
46ACTIVITY_PRUNE_DAYS=30
47ACTIVITY_HIDE_ADMIN=false
48CLIENT_RATELIMIT=10000
49APPLICATION_RATELIMIT=10000
50
51# alpine
52ALPINE_IMAGE=alpine:3.20.3
53
54# wings
55WINGS_TRAEFIK_NAME=pelican-wings
56WINGS_IMAGE=ghcr.io/pelican-dev/wings:v1.0.0-beta6
57WINGS_URL=pelican-node.example.org # Needs to be changed.
58WINGS_PORT=80
59WINGS_SFTP_PORT=2022
60WINGS_UUID=22c62a32-c789-4d59-8438-be1c425450c0 # Needs to be changed.
61WINGS_TOKEN_ID=1uVXCsVsMOWfbYVK # Needs to be changed.
62WINGS_TOKEN=zACf5zVzT0krxOLTA2cNIklV0HaozhdYuVqTMKITpwuRDodmUoELPpn3ybqgLbdl # Needs to be changed.
63WINGS_UPLOAD_LIMIT=100
64WINGS_DNS=1.1.1.1
65WINGS_DNS_SECONDARY=8.8.8.8
docker-compose.yml Raw
1networks:
2 traefik:
3 name: $TRAEFIK_NETWORK_NAME
4
5 pelican:
6
7 wings:
8 name: $NETWORK_NAME
9 driver: bridge
10 driver_opts:
11 com.docker.network.bridge.name: $NETWORK_NAME
12 ipam:
13 config:
14 - subnet: $NETWORK_SUBNET
15
16services:
17 traefik:
18 image: $TRAEFIK_IMAGE
19 restart: unless-stopped
20 command:
21 - --global.sendAnonymousUsage=false
22 - --global.checkNewVersion=false
23 - --providers.docker=true
24 - --providers.docker.exposedByDefault=false
25 - --providers.docker.network=$TRAEFIK_NETWORK_NAME
26 - --serversTransport.insecureSkipVerify=true
27 - --entryPoints.web.address=:$TRAEFIK_PORT
28 - --entryPoints.web.asDefault=true
29 networks:
30 - traefik
31 ports:
32 - $TRAEFIK_PORT:$TRAEFIK_PORT
33 volumes:
34 - /var/run/docker.sock:/var/run/docker.sock:ro
35
36 pelican-database:
37 image: $DATABASE_IMAGE
38 restart: unless-stopped
39 networks:
40 - pelican
41 volumes:
42 - $BASE_PATH/database:/var/lib/mysql
43 environment:
44 MYSQL_DATABASE: $DATABASE_NAME
45 MYSQL_USER: $DATABASE_USER
46 MYSQL_PASSWORD: $DATABASE_PASS
47 MYSQL_ROOT_PASSWORD: $DATABASE_ROOT_PASS
48
49 pelican-redis:
50 image: $REDIS_IMAGE
51 restart: unless-stopped
52 networks:
53 - pelican
54
55 pelican-panel:
56 image: $PANEL_IMAGE
57 restart: unless-stopped
58 healthcheck:
59 test: curl -f http://localhost:$PANEL_PORT/up
60 interval: 10s
61 timeout: 10s
62 retries: 10
63 networks:
64 - traefik
65 - pelican
66 volumes:
67 - $BASE_PATH/panel:$PANEL_PATH
68 environment:
69 XDG_DATA_HOME: $PANEL_PATH
70 APP_TIMEZONE: $TIMEZONE
71 APP_URL: $PANEL_URL_SCHEME://$PANEL_URL, http://, https://
72 APP_DEBUG: $DEBUG
73 APP_NAME: $NAME
74 TRUSTED_PROXIES: $TRUSTED_PROXIES
75 ADMIN_EMAIL: $EMAIL
76 DB_CONNECTION: $DATABASE_TYPE
77 DB_HOST: pelican-database
78 DB_PORT: $DATABASE_PORT
79 DB_DATABASE: $DATABASE_NAME
80 DB_USERNAME: $DATABASE_USER
81 DB_PASSWORD: $DATABASE_PASS
82 REDIS_HOST: pelican-redis
83 REDIS_PORT: $REDIS_PORT
84 CACHE_STORE: redis
85 SESSION_DRIVER: redis
86 QUEUE_CONNECTION: redis
87 FILAMENT_TOP_NAVIGATION: $TOP_NAVIGATION
88 RECAPTCHA_ENABLED: false
89 APP_BACKUP_DRIVER: wings
90 MAIL_MAILER: log
91 PANEL_CLIENT_ALLOCATIONS_ENABLED: $CLIENT_ALLOCATIONS
92 PANEL_SEND_INSTALL_NOTIFICATION: false
93 PANEL_SEND_REINSTALL_NOTIFICATION: false
94 PANEL_EDITABLE_SERVER_DESCRIPTIONS: $EDITABLE_SERVER_DESCRIPTIONS
95 PANEL_USE_BINARY_PREFIX: $BINARY_PREFIX
96 BACKUP_THROTTLE_LIMIT: $BACKUP_THROTTLE_LIMIT
97 BACKUP_THROTTLE_PERIOD: $BACKUP_THROTTLE_PERIOD
98 GUZZLE_TIMEOUT: $REQUEST_TIMEOUT
99 GUZZLE_CONNECT_TIMEOUT: $CONNECT_TIMEOUT
100 APP_ACTIVITY_PRUNE_DAYS: $ACTIVITY_PRUNE_DAYS
101 APP_ACTIVITY_HIDE_ADMIN: $ACTIVITY_HIDE_ADMIN
102 APP_API_CLIENT_RATELIMIT: $CLIENT_RATELIMIT
103 APP_API_APPLICATION_RATELIMIT: $APPLICATION_RATELIMIT
104 labels:
105 - traefik.enable=true
106 - traefik.http.routers.$PANEL_TRAEFIK_NAME.rule=Host(`$PANEL_URL`)
107 - traefik.http.services.$PANEL_TRAEFIK_NAME.loadbalancer.server.port=$PANEL_PORT
108 depends_on:
109 - pelican-database
110 - pelican-redis
111
112 alpine:
113 image: $ALPINE_IMAGE
114 restart: no
115 entrypoint: ["/bin/sh", "-c"]
116 command:
117 - |
118 cat <<EOF > /wings/config.yml
119 app_name: $NAME
120 uuid: $WINGS_UUID
121 token_id: $WINGS_TOKEN_ID
122 token: $WINGS_TOKEN
123 api:
124 host: 0.0.0.0
125 port: $WINGS_PORT
126 ssl:
127 enabled: false
128 upload_limit: $WINGS_UPLOAD_LIMIT
129 system:
130 root_directory: $BASE_PATH/wings/servers
131 data: $BASE_PATH/wings/servers/volumes
132 archive_directory: $BASE_PATH/wings/servers/archives
133 backup_directory: $BASE_PATH/wings/servers/backups
134 tmp_directory: $BASE_PATH/wings/temp
135 log_directory: $BASE_PATH/wings/logs
136 timezone: $TIMEZONE
137 sftp:
138 bind_address: 0.0.0.0
139 bind_port: $WINGS_SFTP_PORT
140 user:
141 mount_passwd: false
142 docker:
143 network:
144 interface: $NETWORK_GATEWAY
145 dns:
146 - $WINGS_DNS
147 - $WINGS_DNS_SECONDARY
148 name: $NETWORK_NAME
149 driver: bridge
150 network_mode: $NETWORK_NAME
151 IPv6: false
152 interfaces:
153 v4:
154 subnet: $NETWORK_SUBNET
155 gateway: $NETWORK_GATEWAY
156 remote: http://pelican-panel:$PANEL_PORT
157 allowed_origins:
158 - http://pelican-panel:$PANEL_PORT
159 - $PANEL_URL_SCHEME://$PANEL_URL
160 EOF
161 exit
162 volumes:
163 - $BASE_PATH/wings/data:/wings
164
165 pelican-wings:
166 image: $WINGS_IMAGE
167 restart: unless-stopped
168 networks:
169 - traefik
170 - pelican
171 - wings
172 volumes:
173 - $BASE_PATH/wings/data:/etc/pelican
174 - $BASE_PATH/wings/servers:$BASE_PATH/wings/servers
175 - $BASE_PATH/wings/temp:$BASE_PATH/wings/temp
176 - $BASE_PATH/wings/logs:$BASE_PATH/wings/logs
177 - /var/run/docker.sock:/var/run/docker.sock
178 - /var/lib/docker/containers:/var/lib/docker/containers
179 environment:
180 TZ: $TIMEZONE
181 labels:
182 - traefik.enable=true
183 - traefik.http.routers.$WINGS_TRAEFIK_NAME.rule=Host(`$WINGS_URL`)
184 - traefik.http.services.$WINGS_TRAEFIK_NAME.loadbalancer.server.port=$WINGS_PORT
185 depends_on:
186 pelican-panel:
187 condition: service_healthy
188 alpine:
189 condition: service_completed_successfully