Skip to content

Commit 1ac13c8

Browse files
committed
more docker changes
1 parent b7da853 commit 1ac13c8

File tree

3 files changed

+70
-9
lines changed

3 files changed

+70
-9
lines changed

.dev/docker/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Pterodactyl Panel - Docker Image
2+
This is a ready to use docker image for the panel.
3+
4+
## Requirements
5+
This docker image requires some additional software to function. The software can either be provided in other containers (see the [docker-compose.yml](docker-compose.yml) as an example) or as existing instances.
6+
7+
A mysql database is required. We recommend [this](quay.io/parkervcp/mariadb-alpine) image if you prefer to run it in a docker container. As a non-containerized option we recommend mariadb.
8+
9+
A caching software is required as well. You can choose any of the [supported options](#cache-drivers).
10+
11+
You can provide additional settings using a custom `.env` file or by setting the appropriate environment variables.
12+
13+
## Setup
14+
15+
Start the docker container and the required dependencies (either provide existing ones or start containers as well, see the [docker-compose.yml](docker-compose.yml) file as an example).
16+
17+
After the startup is complete you'll need to create a user.
18+
If you are running the docker container without docker-compose, use:
19+
```
20+
docker exec -it <container id> php artisan pterodactyl:user
21+
```
22+
If you are using docker compose use
23+
```
24+
docker-compose exec panel php artisan pterodactyl:user
25+
```
26+
27+
## Environment Variables
28+
There are multiple environment variables to configure the panel when not providing your own `.env` file, see the following table for details on each available option.
29+
30+
Note: If your `APP_URL` starts with `https://` you need to provide an `LETSENCRYPT_EMAIL` as well so Certificates can be generated.
31+
32+
| Variable | Description | Required |
33+
| ------------------- | ------------------------------------------------------------------------------ | -------- |
34+
| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes |
35+
| `LETSENCRYPT_EMAIL` | The email used for letsencrypt certificate generation | yes |
36+
| `DB_HOST` | The host of the mysql instance | yes |
37+
| `DB_PORT` | The port of the mysql instance | yes |
38+
| `DB_DATABASE` | The name of the mysql database | yes |
39+
| `DB_USERNAME` | The mysql user | yes |
40+
| `DB_PASSWORD` | The mysql password for the specified user | yes |
41+
| `CACHE_DRIVER` | The cache driver (see [Cache drivers](#cache-drivers) for detais) | yes |
42+
| `MAIL_DRIVER` | The email driver (see [Mail drivers](#mail-drivers) for details) | yes |
43+
| `MAIL_FROM` | The email that should be used as the sender email | yes |
44+
| `MAIL_HOST` | The host of your mail driver instance | maybe |
45+
| `MAIL_PORT` | The port of your mail driver instance | maybe |
46+
| `MAIL_USERNAME` | The username for your mail driver | maybe |
47+
| `MAIL_PASSWORD` | The password for your mail driver | maybe |
48+
| `APP_TIMEZONE` | The timezone to use for the panel | yes |
49+
50+
51+
### Cache drivers
52+
You can choose between different cache drivers depending on what you prefer.
53+
We recommend redis when using docker as it can be started in a container easily.
54+
55+
| Driver | Description | Required variables |
56+
| -------- | ------------------------------------ | ------------------------------------------------------ |
57+
| redis | | `REDIS_HOST` |
58+
59+
### Mail drivers
60+
You can choose between different mail drivers according to your needs.
61+
Every driver requires `MAIL_FROM` to be set.
62+
63+
| Driver | Description | Required variables |
64+
| -------- | ------------------------------------ | ------------------------------------------------------------- |
65+
| mail | uses the installed php mail | |
66+
| mandrill | [Mandrill](http://www.mandrill.com/) | `MAIL_USERNAME` |
67+
| postmark | [Postmark](https://postmarkapp.com/) | `MAIL_USERNAME` |
68+
| mailgun | [Mailgun](https://www.mailgun.com/) | `MAIL_USERNAME`, `MAIL_HOST` |
69+
| smtp | Any SMTP server can be configured | `MAIL_USERNAME`, `MAIL_HOST`, `MAIL_PASSWORD`, `MAIL_PORT` |
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ do
1010
sleep 5
1111
done
1212

13-
#sed -i s/DB_HOST=127.0.0.1/DB_HOST=$DB_HOST/g /app/.env
14-
#sed -i s/DB_DATABASE=panel/DB_DATABASE=$DB_DATABASE/g /app/.env
15-
#sed -i s/DB_USERNAME=pterodactyl/DB_USERNAME=$DB_USERNAME/g /app/.env
16-
#sed -i s/DB_PASSWORD=/DB_PASSWORD=$DB_PASSWORD/g /app/.env
17-
18-
#chown -R www-data:www-data .
19-
chmod -R 777 storage/* bootstrap/cache /var/run/php /app/.env
20-
2113
if [ "$(cat .env)" == "" ]; then
2214
cat /app/.env.example > /app/.env
2315
fi

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ EXPOSE 80 443
1616

1717
RUN chown -R nginx:nginx . && chmod -R 777 storage/* bootstrap/cache
1818

19-
ENTRYPOINT ["ash", ".dev/entrypoint.sh"]
19+
ENTRYPOINT ["ash", ".dev/app/entrypoint.sh"]

0 commit comments

Comments
 (0)