Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit 36c1f13

Browse files
committed
Add Dockerfile && docker-compose.yml
1 parent eb753e0 commit 36c1f13

3 files changed

Lines changed: 96 additions & 0 deletions

File tree

Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM php:7.4-fpm
2+
3+
RUN apt-get update && apt-get install -y \
4+
libxml2-dev \
5+
libicu-dev \
6+
libcurl3-dev \
7+
libsqlite3-dev \
8+
libedit-dev \
9+
zlib1g-dev \
10+
libfreetype6-dev \
11+
libjpeg62-turbo-dev \
12+
libmemcached-dev \
13+
libzip-dev \
14+
libonig-dev \
15+
libpq-dev
16+
RUN docker-php-ext-install \
17+
intl \
18+
pdo_mysql \
19+
pdo_pgsql \
20+
opcache \
21+
bcmath \
22+
soap \
23+
sockets \
24+
zip \
25+
&& docker-php-ext-configure gd \
26+
&& docker-php-ext-install -j$(nproc) gd
27+
28+
RUN pecl install apcu \
29+
&& pecl install apcu_bc \
30+
&& docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \
31+
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini
32+
33+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
34+
RUN curl -sS https://get.symfony.com/cli/installer | bash -s -- "--install-dir=/usr/local/bin"
35+
36+
RUN apt-get update && apt-get install -y \
37+
openssh-client \
38+
git \
39+
gnupg \
40+
apt-transport-https
41+
42+
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
43+
RUN apt-get install -y nodejs
44+
RUN mkdir /.npm && chown -R 1000:1000 "/.npm"
45+
46+
WORKDIR /var/www/xtools
47+
48+
CMD ["php-fpm"]

docker-compose.override.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "3.8"
2+
services:
3+
traefik:
4+
image: traefik:v2.5
5+
command:
6+
- --providers.docker
7+
- --entryPoints.web.address=:80
8+
- --entryPoints.websecure.address=:443
9+
ports:
10+
- "80:80"
11+
- "443:443"
12+
volumes:
13+
- /var/run/docker.sock:/var/run/docker.sock
14+
15+
adminer:
16+
image: adminer
17+
labels:
18+
- traefik.enable=true
19+
- traefik.http.routers.adminer.rule=Host(`adminer.localhost`)
20+
- traefik.http.routers.adminer.entryPoints=web
21+
depends_on:
22+
- mariadb
23+
24+
php:
25+
labels:
26+
- traefik.enable=true
27+
- traefik.http.routers.app.rule=Host(`xtools.localhost`)
28+
- traefik.http.routers.app.entryPoints=web
29+
volumes:
30+
- .:/var/www/xtools

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "3.8"
2+
services:
3+
mariadb:
4+
hostname: mariadb
5+
image: mariadb
6+
ports:
7+
- "3306:3306"
8+
environment:
9+
MYSQL_ROOT_PASSWORD: xtools
10+
11+
php:
12+
user: ${UID:-1000}:${GID:-1000}
13+
hostname: php8.2-fpm
14+
build: .
15+
ports:
16+
- "8000:80"
17+
depends_on:
18+
- mariadb

0 commit comments

Comments
 (0)