-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile && docker-compose.yml
- Loading branch information
Showing
4 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# This file is a "template" of which env vars need to be defined for your application | ||
# Copy this file to .env file for development, create environment variables when deploying to production | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=ThisTokenIsNotSoSecretChangeIt | ||
#TRUSTED_PROXIES= | ||
#TRUSTED_HOSTS= | ||
###< symfony/framework-bundle ### | ||
|
||
DATABASE_HOST=mariadb | ||
DATABASE_PORT=3306 | ||
DATABASE_NAME=xtools | ||
DATABASE_USER=root | ||
DATABASE_PASSWORD=xtools | ||
|
||
DATABASE_REPLICA_USER= | ||
DATABASE_REPLICA_PASSWORD= | ||
DATABASE_REPLICA_HOST_S1=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S1=3306 | ||
DATABASE_REPLICA_HOST_S2=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S2=3306 | ||
DATABASE_REPLICA_HOST_S3=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S3=3306 | ||
DATABASE_REPLICA_HOST_S4=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S4=3306 | ||
DATABASE_REPLICA_HOST_S5=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S5=3306 | ||
DATABASE_REPLICA_HOST_S6=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S6=3306 | ||
DATABASE_REPLICA_HOST_S7=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S7=3306 | ||
DATABASE_REPLICA_HOST_S8=127.0.0.1 | ||
DATABASE_REPLICA_PORT_S8=3306 | ||
|
||
DATABASE_TOOLSDB_HOST=127.0.0.1 | ||
DATABASE_TOOLSDB_PORT= | ||
|
||
WIKI_URL=https://en.wikipedia.org | ||
API_PATH=/w/api.php | ||
DEFAULT_PROJECT=en.wikipedia.org | ||
CENTRAL_AUTH_PROJECT=meta.wikimedia.org | ||
OPTED_IN="enwiki,newiki" | ||
|
||
APP_NOTICE_DISPLAY=0 | ||
APP_NOTICE_STYLE= | ||
APP_NOTICE_TEXT= | ||
|
||
APP_SINGLE_WIKI=0 | ||
APP_IS_WMF=1 | ||
APP_REPLAG_THRESHOLD=30 | ||
APP_RATE_LIMIT_TIME=0 | ||
APP_RATE_LIMIT_COUNT=0 | ||
APP_QUERY_TIMEOUT=900 | ||
APP_MAX_PAGE_REVISIONS=50000 | ||
APP_MAX_USER_EDITS=350000 | ||
APP_MULTILINGUAL_WIKIS= | ||
APP_ENABLE_ADMINSCORE=1 | ||
APP_ENABLE_ADMINSTATS=1 | ||
APP_ENABLE_ARTICLEINFO=1 | ||
APP_ENABLE_AUTHORSHIP=1 | ||
APP_ENABLE_AUTOEDITS=1 | ||
APP_ENABLE_BLAME=1 | ||
APP_ENABLE_CATEGORYEDITS=1 | ||
APP_ENABLE_EDITCOUNTER=1 | ||
APP_ENABLE_EDITSUMMARY=1 | ||
APP_ENABLE_GLOBALCONTRIBS=1 | ||
APP_ENABLE_LARGESTPAGES=1 | ||
APP_ENABLE_META=1 | ||
APP_ENABLE_PAGES=1 | ||
APP_ENABLE_QUOTE=0 | ||
APP_ENABLE_RFXANALYSIS=0 | ||
APP_ENABLE_RFXVOTECALCULATOR=0 | ||
APP_ENABLE_SIMPLEEDITCOUNTER=1 | ||
APP_ENABLE_TOPEDITS=1 | ||
|
||
# Oauth consumer credentials, from https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration | ||
OAUTH_KEY= | ||
OAUTH_SECRET= | ||
|
||
###> symfony/mailer-bundle ### | ||
MAILER_DSN=null://localhost | ||
MAILER_FROM_EMAIL=[email protected] | ||
MAILER_TO_EMAIL= | ||
###< symfony/mailer-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM php:7.4-fpm | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libxml2-dev \ | ||
libicu-dev \ | ||
libcurl3-dev \ | ||
libsqlite3-dev \ | ||
libedit-dev \ | ||
zlib1g-dev \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmemcached-dev \ | ||
libzip-dev \ | ||
libonig-dev \ | ||
libpq-dev | ||
RUN docker-php-ext-install \ | ||
intl \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
opcache \ | ||
bcmath \ | ||
soap \ | ||
sockets \ | ||
zip \ | ||
&& docker-php-ext-configure gd \ | ||
&& docker-php-ext-install -j$(nproc) gd | ||
|
||
RUN pecl install apcu \ | ||
&& pecl install apcu_bc \ | ||
&& docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \ | ||
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
RUN curl -sS https://get.symfony.com/cli/installer | bash -s -- "--install-dir=/usr/local/bin" | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
openssh-client \ | ||
git \ | ||
gnupg \ | ||
apt-transport-https | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash | ||
RUN apt-get install -y nodejs | ||
|
||
WORKDIR /var/www/xtools | ||
|
||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: "3.8" | ||
services: | ||
traefik: | ||
image: traefik:v2.5 | ||
command: | ||
- --providers.docker | ||
- --entryPoints.web.address=:80 | ||
- --entryPoints.websecure.address=:443 | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
adminer: | ||
image: adminer | ||
labels: | ||
- traefik.enable=true | ||
- traefik.http.routers.adminer.rule=Host(`adminer.localhost`) | ||
- traefik.http.routers.adminer.entryPoints=web | ||
depends_on: | ||
- mariadb | ||
|
||
php: | ||
labels: | ||
- traefik.enable=true | ||
- traefik.http.routers.app.rule=Host(`xtools.localhost`) | ||
- traefik.http.routers.app.entryPoints=web | ||
volumes: | ||
- .:/var/www/xtools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3.8" | ||
services: | ||
mariadb: | ||
hostname: mariadb | ||
image: mariadb | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: xtools | ||
|
||
php: | ||
user: ${UID:-1000}:${GID:-1000} | ||
hostname: php8.2-fpm | ||
build: . | ||
ports: | ||
- "8000:80" | ||
depends_on: | ||
- mariadb |