snipcola revised this gist . Go to revision
1 file changed, 1 deletion
docker-compose.yml
@@ -162,7 +162,6 @@ services: | |||
162 | 162 | - pelican | |
163 | 163 | - wings | |
164 | 164 | volumes: | |
165 | - | - $BASE_PATH/wings/data:/etc/pelican | |
166 | 165 | - $BASE_PATH/wings/servers:$BASE_PATH/wings/servers | |
167 | 166 | - $BASE_PATH/wings/temp:$BASE_PATH/wings/temp | |
168 | 167 | - $BASE_PATH/wings/logs:$BASE_PATH/wings/logs |
snipcola revised this gist . Go to revision
2 files changed, 49 insertions, 59 deletions
.env
@@ -48,9 +48,6 @@ ACTIVITY_HIDE_ADMIN=false | |||
48 | 48 | CLIENT_RATELIMIT=10000 | |
49 | 49 | APPLICATION_RATELIMIT=10000 | |
50 | 50 | ||
51 | - | # alpine | |
52 | - | ALPINE_IMAGE=alpine:3.20.3 | |
53 | - | ||
54 | 51 | # wings | |
55 | 52 | WINGS_TRAEFIK_NAME=pelican-wings | |
56 | 53 | WINGS_IMAGE=ghcr.io/pelican-dev/wings:v1.0.0-beta6 |
docker-compose.yml
@@ -13,6 +13,51 @@ networks: | |||
13 | 13 | config: | |
14 | 14 | - subnet: $NETWORK_SUBNET | |
15 | 15 | ||
16 | + | configs: | |
17 | + | pelican-wings-config: | |
18 | + | content: | | |
19 | + | app_name: $NAME | |
20 | + | uuid: $WINGS_UUID | |
21 | + | token_id: $WINGS_TOKEN_ID | |
22 | + | token: $WINGS_TOKEN | |
23 | + | api: | |
24 | + | host: 0.0.0.0 | |
25 | + | port: $WINGS_PORT | |
26 | + | ssl: | |
27 | + | enabled: false | |
28 | + | upload_limit: $WINGS_UPLOAD_LIMIT | |
29 | + | system: | |
30 | + | root_directory: $BASE_PATH/wings/servers | |
31 | + | data: $BASE_PATH/wings/servers/volumes | |
32 | + | archive_directory: $BASE_PATH/wings/servers/archives | |
33 | + | backup_directory: $BASE_PATH/wings/servers/backups | |
34 | + | tmp_directory: $BASE_PATH/wings/temp | |
35 | + | log_directory: $BASE_PATH/wings/logs | |
36 | + | timezone: $TIMEZONE | |
37 | + | sftp: | |
38 | + | bind_address: 0.0.0.0 | |
39 | + | bind_port: $WINGS_SFTP_PORT | |
40 | + | user: | |
41 | + | mount_passwd: false | |
42 | + | docker: | |
43 | + | network: | |
44 | + | interface: $NETWORK_GATEWAY | |
45 | + | dns: | |
46 | + | - $WINGS_DNS | |
47 | + | - $WINGS_DNS_SECONDARY | |
48 | + | name: $NETWORK_NAME | |
49 | + | driver: bridge | |
50 | + | network_mode: $NETWORK_NAME | |
51 | + | IPv6: false | |
52 | + | interfaces: | |
53 | + | v4: | |
54 | + | subnet: $NETWORK_SUBNET | |
55 | + | gateway: $NETWORK_GATEWAY | |
56 | + | remote: http://pelican-panel:$PANEL_PORT | |
57 | + | allowed_origins: | |
58 | + | - http://pelican-panel:$PANEL_PORT | |
59 | + | - $PANEL_URL_SCHEME://$PANEL_URL | |
60 | + | ||
16 | 61 | services: | |
17 | 62 | traefik: | |
18 | 63 | image: $TRAEFIK_IMAGE | |
@@ -109,59 +154,6 @@ services: | |||
109 | 154 | - pelican-database | |
110 | 155 | - pelican-redis | |
111 | 156 | ||
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 | 157 | pelican-wings: | |
166 | 158 | image: $WINGS_IMAGE | |
167 | 159 | restart: unless-stopped | |
@@ -178,12 +170,13 @@ services: | |||
178 | 170 | - /var/lib/docker/containers:/var/lib/docker/containers | |
179 | 171 | environment: | |
180 | 172 | TZ: $TIMEZONE | |
173 | + | configs: | |
174 | + | - source: pelican-wings-config | |
175 | + | target: /etc/pelican/config.yml | |
181 | 176 | labels: | |
182 | 177 | - traefik.enable=true | |
183 | 178 | - traefik.http.routers.$WINGS_TRAEFIK_NAME.rule=Host(`$WINGS_URL`) | |
184 | 179 | - traefik.http.services.$WINGS_TRAEFIK_NAME.loadbalancer.server.port=$WINGS_PORT | |
185 | 180 | depends_on: | |
186 | 181 | pelican-panel: | |
187 | - | condition: service_healthy | |
188 | - | alpine: | |
189 | - | condition: service_completed_successfully | |
182 | + | condition: service_healthy |
snipcola revised this gist . Go to revision
1 file changed, 3 insertions, 3 deletions
docker-compose.yml
@@ -57,9 +57,9 @@ services: | |||
57 | 57 | restart: unless-stopped | |
58 | 58 | healthcheck: | |
59 | 59 | test: curl -f http://localhost:$PANEL_PORT/up | |
60 | - | interval: 5s | |
61 | - | timeout: 5s | |
62 | - | retries: 15 | |
60 | + | interval: 10s | |
61 | + | timeout: 10s | |
62 | + | retries: 10 | |
63 | 63 | networks: | |
64 | 64 | - traefik | |
65 | 65 | - pelican |
snipcola revised this gist . Go to revision
1 file changed, 4 insertions, 4 deletions
docker-compose.yml
@@ -56,10 +56,10 @@ services: | |||
56 | 56 | image: $PANEL_IMAGE | |
57 | 57 | restart: unless-stopped | |
58 | 58 | healthcheck: | |
59 | - | test: ["CMD", "curl", "-f", "http://localhost:$PANEL_PORT/up"] | |
60 | - | interval: 10s | |
61 | - | timeout: 10s | |
62 | - | retries: 5 | |
59 | + | test: curl -f http://localhost:$PANEL_PORT/up | |
60 | + | interval: 5s | |
61 | + | timeout: 5s | |
62 | + | retries: 15 | |
63 | 63 | networks: | |
64 | 64 | - traefik | |
65 | 65 | - pelican |
snipcola revised this gist . Go to revision
1 file changed, 4 insertions, 2 deletions
docker-compose.yml
@@ -183,5 +183,7 @@ services: | |||
183 | 183 | - traefik.http.routers.$WINGS_TRAEFIK_NAME.rule=Host(`$WINGS_URL`) | |
184 | 184 | - traefik.http.services.$WINGS_TRAEFIK_NAME.loadbalancer.server.port=$WINGS_PORT | |
185 | 185 | depends_on: | |
186 | - | - pelican-panel | |
187 | - | - alpine | |
186 | + | pelican-panel: | |
187 | + | condition: service_healthy | |
188 | + | alpine: | |
189 | + | condition: service_completed_successfully |
snipcola revised this gist . Go to revision
2 files changed, 252 insertions
.env(file created)
@@ -0,0 +1,65 @@ | |||
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(file created)
@@ -0,0 +1,187 @@ | |||
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: ["CMD", "curl", "-f", "http://localhost:$PANEL_PORT/up"] | |
60 | + | interval: 10s | |
61 | + | timeout: 10s | |
62 | + | retries: 5 | |
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 | + | - alpine |