Merge branch 'develop' of https://github.com/pterodactyl/wings into develop
This commit is contained in:
commit
7f93e5f9d5
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# ----------------------------------
|
||||||
|
# Pterodactyl Panel Dockerfile
|
||||||
|
# ----------------------------------
|
||||||
|
|
||||||
|
FROM golang:1.14-alpine
|
||||||
|
COPY . /go/wings/
|
||||||
|
WORKDIR /go/wings/
|
||||||
|
RUN apk add --no-cache upx \
|
||||||
|
&& go build -ldflags="-s -w" \
|
||||||
|
&& upx --brute wings
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
COPY --from=0 /go/wings/wings /usr/bin/
|
||||||
|
CMD ["wings","--config", "/var/lib/pterodactyl/config.yml"]
|
|
@ -268,6 +268,28 @@ func (c *Configuration) EnsureFilePermissions() error {
|
||||||
|
|
||||||
r := regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$")
|
r := regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$")
|
||||||
|
|
||||||
|
// add trailing slash on data directory is no trailing slash exists
|
||||||
|
if ! strings.HasSuffix(c.System.Data, "/") {
|
||||||
|
c.System.Data = c.System.Data + "/"
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the daemon-data dir if it doesn't exist
|
||||||
|
p, _ := path.Split(c.System.Data)
|
||||||
|
|
||||||
|
if _, err := os.Stat(c.System.Data); err != nil {
|
||||||
|
// if file doesn't exist
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
//
|
||||||
|
if err = os.Mkdir(p, 0755); err != nil {
|
||||||
|
// of we can't make the directory return error
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// if the error is anything but IsNotExist
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
files, err := ioutil.ReadDir(c.System.Data)
|
files, err := ioutil.ReadDir(c.System.Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
26
docker-compose.example.yml
Normal file
26
docker-compose.example.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
daemon:
|
||||||
|
build: .
|
||||||
|
restart: always
|
||||||
|
hostname: daemon
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
- "2022:2022"
|
||||||
|
tty: true
|
||||||
|
environment:
|
||||||
|
- "DEBUG=false"
|
||||||
|
volumes:
|
||||||
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
- "/var/lib/docker/containers/:/var/lib/docker/containers/"
|
||||||
|
- "/var/lib/pterodactyl/:/var/lib/pterodactyl/"
|
||||||
|
- "/srv/daemon-data/:/srv/daemon-data/"
|
||||||
|
- "/tmp/pterodactyl/:/tmp/pterodactyl/"
|
||||||
|
- "/etc/timezone:/etc/timezone:ro"
|
||||||
|
## Required for ssl if you user let's encrypt. uncomment to use.
|
||||||
|
## - "/etc/letsencrypt/:/etc/letsencrypt/"
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.21.0.0/16
|
Loading…
Reference in New Issue
Block a user