.env
· 1.6 KiB · Bash
Raw
BASE_PATH=/var/lib/pelican # Path has to be absolute, else wings won't work.
TIMEZONE=Europe/London
# network
NETWORK_NAME=wings
NETWORK_SUBNET=192.30.0.0/16
NETWORK_GATEWAY=192.30.0.1
# traefik
TRAEFIK_IMAGE=traefik:3.2
TRAEFIK_NETWORK_NAME=traefik
TRAEFIK_PORT=80
# database
DATABASE_TYPE=mariadb
DATABASE_IMAGE=mariadb:11.5.2
DATABASE_PORT=3306
DATABASE_NAME=pelican
DATABASE_USER=pelican
DATABASE_PASS=P6i4hh6L5Q # Needs to be changed.
DATABASE_ROOT_PASS=lhu2bgjY5b # Needs to be changed.
# redis
REDIS_IMAGE=redis:7.4.1-alpine
REDIS_PORT=6379
# panel
PANEL_TRAEFIK_NAME=pelican-panel
PANEL_IMAGE=ghcr.io/pelican-dev/panel:v1.0.0-beta11
PANEL_URL_SCHEME=https # Needs to be changed.
PANEL_URL=pelican.example.org # Needs to be changed.
PANEL_PORT=80
PANEL_PATH=/pelican-data
DEBUG=false
NAME=Pelican
EMAIL=pelican@example.org # Needs to be changed.
TRUSTED_PROXIES=*
TOP_NAVIGATION=true
CLIENT_ALLOCATIONS=false
EDITABLE_SERVER_DESCRIPTIONS=false
BINARY_PREFIX=false
BACKUP_THROTTLE_LIMIT=5
BACKUP_THROTTLE_PERIOD=120
REQUEST_TIMEOUT=60
CONNECT_TIMEOUT=60
ACTIVITY_PRUNE_DAYS=30
ACTIVITY_HIDE_ADMIN=false
CLIENT_RATELIMIT=10000
APPLICATION_RATELIMIT=10000
# alpine
ALPINE_IMAGE=alpine:3.20.3
# wings
WINGS_TRAEFIK_NAME=pelican-wings
WINGS_IMAGE=ghcr.io/pelican-dev/wings:v1.0.0-beta6
WINGS_URL=pelican-node.example.org # Needs to be changed.
WINGS_PORT=80
WINGS_SFTP_PORT=2022
WINGS_UUID=22c62a32-c789-4d59-8438-be1c425450c0 # Needs to be changed.
WINGS_TOKEN_ID=1uVXCsVsMOWfbYVK # Needs to be changed.
WINGS_TOKEN=zACf5zVzT0krxOLTA2cNIklV0HaozhdYuVqTMKITpwuRDodmUoELPpn3ybqgLbdl # Needs to be changed.
WINGS_UPLOAD_LIMIT=100
WINGS_DNS=1.1.1.1
WINGS_DNS_SECONDARY=8.8.8.8
1 | BASE_PATH=/var/lib/pelican # Path has to be absolute, else wings won't work. |
2 | TIMEZONE=Europe/London |
3 | |
4 | # network |
5 | NETWORK_NAME=wings |
6 | NETWORK_SUBNET=192.30.0.0/16 |
7 | NETWORK_GATEWAY=192.30.0.1 |
8 | |
9 | # traefik |
10 | TRAEFIK_IMAGE=traefik:3.2 |
11 | TRAEFIK_NETWORK_NAME=traefik |
12 | TRAEFIK_PORT=80 |
13 | |
14 | # database |
15 | DATABASE_TYPE=mariadb |
16 | DATABASE_IMAGE=mariadb:11.5.2 |
17 | DATABASE_PORT=3306 |
18 | DATABASE_NAME=pelican |
19 | DATABASE_USER=pelican |
20 | DATABASE_PASS=P6i4hh6L5Q # Needs to be changed. |
21 | DATABASE_ROOT_PASS=lhu2bgjY5b # Needs to be changed. |
22 | |
23 | # redis |
24 | REDIS_IMAGE=redis:7.4.1-alpine |
25 | REDIS_PORT=6379 |
26 | |
27 | # panel |
28 | PANEL_TRAEFIK_NAME=pelican-panel |
29 | PANEL_IMAGE=ghcr.io/pelican-dev/panel:v1.0.0-beta11 |
30 | PANEL_URL_SCHEME=https # Needs to be changed. |
31 | PANEL_URL=pelican.example.org # Needs to be changed. |
32 | PANEL_PORT=80 |
33 | PANEL_PATH=/pelican-data |
34 | DEBUG=false |
35 | NAME=Pelican |
36 | EMAIL=pelican@example.org # Needs to be changed. |
37 | TRUSTED_PROXIES=* |
38 | TOP_NAVIGATION=true |
39 | CLIENT_ALLOCATIONS=false |
40 | EDITABLE_SERVER_DESCRIPTIONS=false |
41 | BINARY_PREFIX=false |
42 | BACKUP_THROTTLE_LIMIT=5 |
43 | BACKUP_THROTTLE_PERIOD=120 |
44 | REQUEST_TIMEOUT=60 |
45 | CONNECT_TIMEOUT=60 |
46 | ACTIVITY_PRUNE_DAYS=30 |
47 | ACTIVITY_HIDE_ADMIN=false |
48 | CLIENT_RATELIMIT=10000 |
49 | APPLICATION_RATELIMIT=10000 |
50 | |
51 | # alpine |
52 | ALPINE_IMAGE=alpine:3.20.3 |
53 | |
54 | # wings |
55 | WINGS_TRAEFIK_NAME=pelican-wings |
56 | WINGS_IMAGE=ghcr.io/pelican-dev/wings:v1.0.0-beta6 |
57 | WINGS_URL=pelican-node.example.org # Needs to be changed. |
58 | WINGS_PORT=80 |
59 | WINGS_SFTP_PORT=2022 |
60 | WINGS_UUID=22c62a32-c789-4d59-8438-be1c425450c0 # Needs to be changed. |
61 | WINGS_TOKEN_ID=1uVXCsVsMOWfbYVK # Needs to be changed. |
62 | WINGS_TOKEN=zACf5zVzT0krxOLTA2cNIklV0HaozhdYuVqTMKITpwuRDodmUoELPpn3ybqgLbdl # Needs to be changed. |
63 | WINGS_UPLOAD_LIMIT=100 |
64 | WINGS_DNS=1.1.1.1 |
65 | WINGS_DNS_SECONDARY=8.8.8.8 |
docker-compose.yml
· 5.5 KiB · YAML
Raw
networks:
traefik:
name: $TRAEFIK_NETWORK_NAME
pelican:
wings:
name: $NETWORK_NAME
driver: bridge
driver_opts:
com.docker.network.bridge.name: $NETWORK_NAME
ipam:
config:
- subnet: $NETWORK_SUBNET
services:
traefik:
image: $TRAEFIK_IMAGE
restart: unless-stopped
command:
- --global.sendAnonymousUsage=false
- --global.checkNewVersion=false
- --providers.docker=true
- --providers.docker.exposedByDefault=false
- --providers.docker.network=$TRAEFIK_NETWORK_NAME
- --serversTransport.insecureSkipVerify=true
- --entryPoints.web.address=:$TRAEFIK_PORT
- --entryPoints.web.asDefault=true
networks:
- traefik
ports:
- $TRAEFIK_PORT:$TRAEFIK_PORT
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
pelican-database:
image: $DATABASE_IMAGE
restart: unless-stopped
networks:
- pelican
volumes:
- $BASE_PATH/database:/var/lib/mysql
environment:
MYSQL_DATABASE: $DATABASE_NAME
MYSQL_USER: $DATABASE_USER
MYSQL_PASSWORD: $DATABASE_PASS
MYSQL_ROOT_PASSWORD: $DATABASE_ROOT_PASS
pelican-redis:
image: $REDIS_IMAGE
restart: unless-stopped
networks:
- pelican
pelican-panel:
image: $PANEL_IMAGE
restart: unless-stopped
healthcheck:
test: curl -f http://localhost:$PANEL_PORT/up
interval: 10s
timeout: 10s
retries: 10
networks:
- traefik
- pelican
volumes:
- $BASE_PATH/panel:$PANEL_PATH
environment:
XDG_DATA_HOME: $PANEL_PATH
APP_TIMEZONE: $TIMEZONE
APP_URL: $PANEL_URL_SCHEME://$PANEL_URL, http://, https://
APP_DEBUG: $DEBUG
APP_NAME: $NAME
TRUSTED_PROXIES: $TRUSTED_PROXIES
ADMIN_EMAIL: $EMAIL
DB_CONNECTION: $DATABASE_TYPE
DB_HOST: pelican-database
DB_PORT: $DATABASE_PORT
DB_DATABASE: $DATABASE_NAME
DB_USERNAME: $DATABASE_USER
DB_PASSWORD: $DATABASE_PASS
REDIS_HOST: pelican-redis
REDIS_PORT: $REDIS_PORT
CACHE_STORE: redis
SESSION_DRIVER: redis
QUEUE_CONNECTION: redis
FILAMENT_TOP_NAVIGATION: $TOP_NAVIGATION
RECAPTCHA_ENABLED: false
APP_BACKUP_DRIVER: wings
MAIL_MAILER: log
PANEL_CLIENT_ALLOCATIONS_ENABLED: $CLIENT_ALLOCATIONS
PANEL_SEND_INSTALL_NOTIFICATION: false
PANEL_SEND_REINSTALL_NOTIFICATION: false
PANEL_EDITABLE_SERVER_DESCRIPTIONS: $EDITABLE_SERVER_DESCRIPTIONS
PANEL_USE_BINARY_PREFIX: $BINARY_PREFIX
BACKUP_THROTTLE_LIMIT: $BACKUP_THROTTLE_LIMIT
BACKUP_THROTTLE_PERIOD: $BACKUP_THROTTLE_PERIOD
GUZZLE_TIMEOUT: $REQUEST_TIMEOUT
GUZZLE_CONNECT_TIMEOUT: $CONNECT_TIMEOUT
APP_ACTIVITY_PRUNE_DAYS: $ACTIVITY_PRUNE_DAYS
APP_ACTIVITY_HIDE_ADMIN: $ACTIVITY_HIDE_ADMIN
APP_API_CLIENT_RATELIMIT: $CLIENT_RATELIMIT
APP_API_APPLICATION_RATELIMIT: $APPLICATION_RATELIMIT
labels:
- traefik.enable=true
- traefik.http.routers.$PANEL_TRAEFIK_NAME.rule=Host(`$PANEL_URL`)
- traefik.http.services.$PANEL_TRAEFIK_NAME.loadbalancer.server.port=$PANEL_PORT
depends_on:
- pelican-database
- pelican-redis
alpine:
image: $ALPINE_IMAGE
restart: no
entrypoint: ["/bin/sh", "-c"]
command:
- |
cat <<EOF > /wings/config.yml
app_name: $NAME
uuid: $WINGS_UUID
token_id: $WINGS_TOKEN_ID
token: $WINGS_TOKEN
api:
host: 0.0.0.0
port: $WINGS_PORT
ssl:
enabled: false
upload_limit: $WINGS_UPLOAD_LIMIT
system:
root_directory: $BASE_PATH/wings/servers
data: $BASE_PATH/wings/servers/volumes
archive_directory: $BASE_PATH/wings/servers/archives
backup_directory: $BASE_PATH/wings/servers/backups
tmp_directory: $BASE_PATH/wings/temp
log_directory: $BASE_PATH/wings/logs
timezone: $TIMEZONE
sftp:
bind_address: 0.0.0.0
bind_port: $WINGS_SFTP_PORT
user:
mount_passwd: false
docker:
network:
interface: $NETWORK_GATEWAY
dns:
- $WINGS_DNS
- $WINGS_DNS_SECONDARY
name: $NETWORK_NAME
driver: bridge
network_mode: $NETWORK_NAME
IPv6: false
interfaces:
v4:
subnet: $NETWORK_SUBNET
gateway: $NETWORK_GATEWAY
remote: http://pelican-panel:$PANEL_PORT
allowed_origins:
- http://pelican-panel:$PANEL_PORT
- $PANEL_URL_SCHEME://$PANEL_URL
EOF
exit
volumes:
- $BASE_PATH/wings/data:/wings
pelican-wings:
image: $WINGS_IMAGE
restart: unless-stopped
networks:
- traefik
- pelican
- wings
volumes:
- $BASE_PATH/wings/data:/etc/pelican
- $BASE_PATH/wings/servers:$BASE_PATH/wings/servers
- $BASE_PATH/wings/temp:$BASE_PATH/wings/temp
- $BASE_PATH/wings/logs:$BASE_PATH/wings/logs
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/containers:/var/lib/docker/containers
environment:
TZ: $TIMEZONE
labels:
- traefik.enable=true
- traefik.http.routers.$WINGS_TRAEFIK_NAME.rule=Host(`$WINGS_URL`)
- traefik.http.services.$WINGS_TRAEFIK_NAME.loadbalancer.server.port=$WINGS_PORT
depends_on:
pelican-panel:
condition: service_healthy
alpine:
condition: service_completed_successfully
1 | networks: |
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 | |
16 | services: |
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 |