Add separate container for environment file
This commit is contained in:
parent
8e7dae4d7f
commit
bf2a1d5d8f
2 changed files with 10 additions and 3 deletions
|
@ -22,6 +22,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
volumes:
|
volumes:
|
||||||
|
- env:/var/www/html/env
|
||||||
- panel:/var/www/html/pterodactyl
|
- panel:/var/www/html/pterodactyl
|
||||||
- storage:/var/www/html/pterodactyl/storage
|
- storage:/var/www/html/pterodactyl/storage
|
||||||
php:
|
php:
|
||||||
|
@ -33,6 +34,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
volumes:
|
volumes:
|
||||||
|
- env:/var/www/html/env
|
||||||
- panel:/var/www/html/pterodactyl
|
- panel:/var/www/html/pterodactyl
|
||||||
- storage:/var/www/html/pterodactyl/storage
|
- storage:/var/www/html/pterodactyl/storage
|
||||||
redis:
|
redis:
|
||||||
|
@ -46,5 +48,6 @@ networks:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
|
env:
|
||||||
panel:
|
panel:
|
||||||
storage:
|
storage:
|
||||||
|
|
|
@ -18,17 +18,21 @@ RUN docker-php-ext-install xml
|
||||||
RUN docker-php-ext-install zip
|
RUN docker-php-ext-install zip
|
||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
# Set up the server working directory.
|
# Set up the server working directories.
|
||||||
RUN adduser -g '' -D -u 9999 pterodactyl
|
RUN adduser -g '' -D -u 9999 pterodactyl
|
||||||
|
RUN mkdir -p /var/www/html/env
|
||||||
RUN mkdir -p /var/www/html/pterodactyl
|
RUN mkdir -p /var/www/html/pterodactyl
|
||||||
WORKDIR /var/www/html/pterodactyl
|
WORKDIR /var/www/html/pterodactyl
|
||||||
RUN chown -R pterodactyl:pterodactyl /var/www/html/pterodactyl
|
RUN chown -R pterodactyl:pterodactyl /var/www/html/pterodactyl /var/www/html/env
|
||||||
|
|
||||||
# Deploy panel files.
|
# Deploy panel files.
|
||||||
USER pterodactyl:pterodactyl
|
USER pterodactyl:pterodactyl
|
||||||
RUN curl -Lo panel.tar.gz https://github.com/Pterodactyl/Panel/releases/download/v0.7.0/panel.tar.gz
|
RUN curl -Lo panel.tar.gz https://github.com/Pterodactyl/Panel/releases/download/v0.7.0/panel.tar.gz
|
||||||
RUN tar --strip-components=1 -xzvf panel.tar.gz
|
RUN tar --strip-components=1 -xzvf panel.tar.gz
|
||||||
RUN cp .env.example .env
|
# Since Docker's configuration mounting feature sucks, we're going to use a cheap
|
||||||
|
# workaround involving symbolic links.
|
||||||
|
RUN cp .env.example /var/www/html/env/.env
|
||||||
|
RUN ln -s /var/www/html/env/.env /var/www/html/pterodactyl/.env
|
||||||
RUN composer install --no-dev
|
RUN composer install --no-dev
|
||||||
RUN chmod -R 755 storage/* bootstrap/cache
|
RUN chmod -R 755 storage/* bootstrap/cache
|
||||||
|
|
||||||
|
|
Reference in a new issue