Dockerized mysql,php,webserver
This commit is contained in:
parent
a2f70fc9ef
commit
2f29555240
16 changed files with 164440 additions and 93942 deletions
81749
dumps/d0274241_2022-01-19.sql
Normal file
81749
dumps/d0274241_2022-01-19.sql
Normal file
File diff suppressed because one or more lines are too long
92
dumps/d0274241_2022-02-09_1955_vorher.sql
Normal file
92
dumps/d0274241_2022-02-09_1955_vorher.sql
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.1.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Erstellungszeit: 09. Feb 2022 um 19:55
|
||||
-- Server-Version: 10.5.11-MariaDB-1:10.5.11+maria~focal-log
|
||||
-- PHP-Version: 7.4.26
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Datenbank: `d0274241`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `leagues`
|
||||
--
|
||||
|
||||
CREATE TABLE `leagues` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`season_id` int(11) DEFAULT NULL,
|
||||
`rank` int(11) DEFAULT NULL,
|
||||
`subrank` int(11) DEFAULT NULL,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
`is_qualification` tinyint(1) DEFAULT NULL,
|
||||
`start_round_id` bigint(20) DEFAULT NULL,
|
||||
`round_count` int(11) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `leagues`
|
||||
--
|
||||
|
||||
INSERT INTO `leagues` (`id`, `season_id`, `rank`, `subrank`, `name`, `is_qualification`, `start_round_id`, `round_count`, `created_at`, `updated_at`) VALUES
|
||||
(140, 8, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 329, 18, '2021-01-21 07:48:16', '2021-01-21 07:48:16'),
|
||||
(139, 8, 2, 1, 'Spielerliga 2', 0, 329, 18, '2021-01-21 07:48:16', '2021-01-21 07:48:16'),
|
||||
(80, 5, 3, 2, 'Spielerliga 3, Gruppe 2', 0, 184, 18, '2019-07-30 13:09:52', '2019-07-30 13:09:52'),
|
||||
(79, 5, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 184, 18, '2019-07-30 13:09:52', '2019-07-30 13:09:52'),
|
||||
(78, 5, 2, 1, 'Spielerliga 2', 0, 184, 18, '2019-07-30 13:09:52', '2019-07-30 13:09:52'),
|
||||
(138, 8, 1, 1, 'Spielerliga 1', 0, 329, 18, '2021-01-21 07:48:16', '2021-01-21 07:48:16'),
|
||||
(81, 6, 1, 1, 'Spielerliga 1', 0, 233, 18, '2020-01-20 15:00:45', '2020-01-20 15:00:45'),
|
||||
(82, 6, 2, 1, 'Spielerliga 2', 0, 233, 18, '2020-01-20 15:00:45', '2020-01-20 15:00:45'),
|
||||
(83, 6, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 233, 18, '2020-01-20 15:00:45', '2020-01-20 15:00:45'),
|
||||
(84, 6, 3, 2, 'Spielerliga 3, Gruppe 2', 0, 233, 18, '2020-01-20 15:00:45', '2020-01-20 15:00:45'),
|
||||
(137, 7, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 281, 21, '2020-09-09 10:47:05', '2020-09-09 10:47:05'),
|
||||
(136, 7, 2, 1, 'Spielerliga 2', 0, 281, 21, '2020-09-09 10:47:05', '2020-09-09 10:47:05'),
|
||||
(135, 7, 1, 1, 'Spielerliga 1', 0, 281, 21, '2020-09-09 10:47:05', '2020-09-09 10:47:05'),
|
||||
(152, 9, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 377, 18, '2021-08-09 08:33:50', '2021-08-09 08:33:50'),
|
||||
(150, 9, 1, 1, 'Spielerliga 1', 0, 377, 18, '2021-08-09 08:33:50', '2021-08-09 08:33:50'),
|
||||
(151, 9, 2, 1, 'Spielerliga 2', 0, 377, 18, '2021-08-09 08:33:50', '2021-08-09 08:33:50'),
|
||||
(164, 10, 3, 2, 'Spielerliga 3, Gruppe 2', 0, 427, 18, '2022-02-09 15:16:11', '2022-02-09 15:16:11'),
|
||||
(163, 10, 3, 1, 'Spielerliga 3, Gruppe 1', 0, 427, 18, '2022-02-09 15:16:11', '2022-02-09 15:16:11'),
|
||||
(162, 10, 2, 1, 'Spielerliga 2', 0, 427, 18, '2022-02-09 15:16:11', '2022-02-09 15:16:11'),
|
||||
(161, 10, 1, 1, 'Spielerliga 1', 0, 427, 18, '2022-02-09 15:16:11', '2022-02-09 15:16:11');
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `leagues`
|
||||
--
|
||||
ALTER TABLE `leagues`
|
||||
ADD UNIQUE KEY `id` (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für exportierte Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für Tabelle `leagues`
|
||||
--
|
||||
ALTER TABLE `leagues`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=165;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
82461
dumps/d0274241_2022-03-22_0920.sql
Normal file
82461
dumps/d0274241_2022-03-22_0920.sql
Normal file
File diff suppressed because one or more lines are too long
10
pfosten/.env
10
pfosten/.env
|
|
@ -1,16 +1,16 @@
|
|||
APP_NAME="Hoschis Tippspiel"
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:kDZstIrXoxXzGa2reMEbvFjDhcaoJ4eKupyPnPL7euE=
|
||||
APP_KEY=base64:dfy2mOUn+iJB57CxYbG/Oukhozcd4oNput/8Ofq8gMQ=
|
||||
APP_DEBUG=true
|
||||
APP_LOG_LEVEL=debug
|
||||
APP_URL=http://localhost
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=pfosten
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=root
|
||||
DB_USERNAME=pf_user
|
||||
DB_PASSWORD=pf_password
|
||||
|
||||
BROADCAST_DRIVER=smtp
|
||||
CACHE_DRIVER=file
|
||||
|
|
@ -30,4 +30,4 @@ MAIL_ENCRYPTION=null
|
|||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_SECRET=
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ APP_LOG_LEVEL=debug
|
|||
APP_URL=http://localhost
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_HOST=DB
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=pfosten
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=root
|
||||
DB_USERNAME=pf_user
|
||||
DB_PASSWORD=pf_password
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
|
|
|
|||
36
pfosten/Dockerfile.dev
Normal file
36
pfosten/Dockerfile.dev
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
FROM php:7.2-fpm
|
||||
|
||||
# Arguments defined in docker-compose.yml
|
||||
ARG user
|
||||
ARG uid
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
-y mariadb-client
|
||||
|
||||
# Clear cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install zip mysqli pdo_mysql mbstring exif pcntl bcmath gd && docker-php-ext-enable mysqli
|
||||
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Create system user to run Composer and Artisan Commands
|
||||
RUN useradd -G www-data,root -u $uid -d /home/$user $user
|
||||
RUN mkdir -p /home/$user/.composer && \
|
||||
chown -R $user:$user /home/$user
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www
|
||||
|
||||
USER $user
|
||||
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
58
pfosten/docker-compose.yml
Normal file
58
pfosten/docker-compose.yml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
args:
|
||||
user: sammy
|
||||
uid: 1000
|
||||
context: ./
|
||||
dockerfile: Dockerfile.dev
|
||||
working_dir: /var/www/
|
||||
environment:
|
||||
- COMPOSER_MEMORY_LIMIT=-1
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./:/var/www
|
||||
networks:
|
||||
- lahmi
|
||||
|
||||
db:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_DATABASE: ${DB_DATABASE}
|
||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
MYSQL_USER: ${DB_USERNAME}
|
||||
SERVICE_TAGS: dev
|
||||
SERVICE_NAME: mysql
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
- ./docker-compose/mysql/my.cnf:/etc/mysql/my.cnf
|
||||
- ./docker-compose/mysql/init:/docker-entrypoint-initdb.d
|
||||
ports:
|
||||
- 3306:3306
|
||||
networks:
|
||||
- lahmi
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- 8005:80
|
||||
depends_on:
|
||||
- db
|
||||
- app
|
||||
volumes:
|
||||
- ./:/var/www
|
||||
- ./docker-compose/nginx:/etc/nginx/conf.d/
|
||||
networks:
|
||||
- lahmi
|
||||
|
||||
networks:
|
||||
lahmi:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
driver: local
|
||||
|
||||
7
pfosten/docker-compose/mysql/init/01-databases.sql
Normal file
7
pfosten/docker-compose/mysql/init/01-databases.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# create databases
|
||||
CREATE DATABASE IF NOT EXISTS `local_laravel`;
|
||||
|
||||
# create local_developer user and grant rights
|
||||
CREATE USER 'local_developer'@'db' IDENTIFIED BY 'secret';
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'local_developer'@'%';
|
||||
|
||||
4
pfosten/docker-compose/mysql/my.cnf
Normal file
4
pfosten/docker-compose/mysql/my.cnf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[mysqld]
|
||||
general_log = 1
|
||||
general_log_file = /var/lib/mysql/general.log
|
||||
|
||||
21
pfosten/docker-compose/nginx/default.conf
Normal file
21
pfosten/docker-compose/nginx/default.conf
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /var/www/public;
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
gzip_static on;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
echo "alias composer='php composer.phar'" >> ~/.bashrc
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
4
pfosten/start_containers.sh
Normal file
4
pfosten/start_containers.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
docker-compose down
|
||||
docker-compose up -d --build
|
||||
docker-compose exec app composer install
|
||||
docker-compose exec app php artisan key:generate
|
||||
Loading…
Add table
Add a link
Reference in a new issue