Added proxy and PMA for dev
parent
80c6851cb3
commit
c7231d648c
3
.env
3
.env
|
|
@ -33,3 +33,6 @@ NGINX_VERSION=1.23-alpine
|
||||||
PHP_VERSION=8.2-fpm-alpine
|
PHP_VERSION=8.2-fpm-alpine
|
||||||
MARIADB_VERSION=10.11
|
MARIADB_VERSION=10.11
|
||||||
|
|
||||||
|
# Set base URL for the project. This will be used by Traefik.
|
||||||
|
#BASE_URL=european-airports.org
|
||||||
|
BASE_URL=localhost
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,15 @@
|
||||||
# (license.md in the root folder of this project) If not, see <http://www.gnu.org/licenses/>.
|
# (license.md in the root folder of this project) If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
# Configuration files
|
# Log files
|
||||||
config.php
|
*.log
|
||||||
|
|
||||||
# Docker Secrets
|
# Docker Secrets
|
||||||
**/secrets/*_pw.txt
|
**/secrets/*_pw.txt
|
||||||
|
|
||||||
|
# Backup files
|
||||||
|
*.bak
|
||||||
|
|
||||||
# Include all README files
|
# Include all README files
|
||||||
!**/README.md
|
!**/README.md
|
||||||
|
|
||||||
|
|
@ -41,8 +44,6 @@ config.php
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
|
|
||||||
.bak
|
|
||||||
|
|
||||||
### WINDOWS ###
|
### WINDOWS ###
|
||||||
desktop.ini
|
desktop.ini
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
# ****************************************************************************************************
|
||||||
|
# * ______ _ _ *
|
||||||
|
# * | ____| /\ (_) | | *
|
||||||
|
# * | |__ _ _ _ __ ___ _ __ ___ __ _ _ __ / \ _ _ __ _ __ ___ _ __| |_ ___ *
|
||||||
|
# * | __|| | | | '__/ _ \| '_ \ / _ \/ _` | '_ \ / /\ \ | | '__| '_ \ / _ \| '__| __/ __| *
|
||||||
|
# * | |___| |_| | | | (_) | |_) | __/ (_| | | | | / ____ \| | | | |_) | (_) | | | |_\__ \ *
|
||||||
|
# * |______\__,_|_| \___/| .__/ \___|\__,_|_| |_| /_/ \_\_|_| | .__/ \___/|_| \__|___/ *
|
||||||
|
# * | | | | *
|
||||||
|
# * |_| |_| *
|
||||||
|
# * *
|
||||||
|
# ****************************************************************************************************
|
||||||
|
|
||||||
|
# This file is part of the European Airports Project, a free, collaborative platform of airport data
|
||||||
|
# extending beyond the official AIPs.
|
||||||
|
|
||||||
|
# Copyright (C) 2023
|
||||||
|
|
||||||
|
# Florian Meissner <florianmeissner@gmx.de>
|
||||||
|
|
||||||
|
# This program is free software: you can redistribute it and/or modify it under the
|
||||||
|
# terms of the GNU General Public License as published by the Free Software Foundation, either
|
||||||
|
# version 3 of the License, or (at your option) any later version. This program is distributed in the
|
||||||
|
# hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
# details. You should have received a copy of the GNU General Public License along with this program.
|
||||||
|
# (license.md in the root folder of this project) If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
###################################################################################################
|
||||||
|
# #
|
||||||
|
# DEVELOPMENT ONLY !!! #
|
||||||
|
# ====================== #
|
||||||
|
# #
|
||||||
|
###################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# DEVELOPMENT Docker-Compose file for services that cannot be related to any particular project.
|
||||||
|
# This file is only ment for development purposes. It features a limited amount of servies and only
|
||||||
|
# works on HTTP.
|
||||||
|
|
||||||
|
# Variables for this file are automatically loaded from the .env file in this directory by the
|
||||||
|
# Docker daemon.
|
||||||
|
|
||||||
|
|
||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
# Traefik Proxy and Load Balancer
|
||||||
|
proxy:
|
||||||
|
container_name: proxy
|
||||||
|
image: traefik:2.9
|
||||||
|
restart: unless-stopped
|
||||||
|
command:
|
||||||
|
- "--api.insecure=true"
|
||||||
|
- "--api.dashboard=true"
|
||||||
|
- "--providers.docker=true"
|
||||||
|
- "--providers.file=true"
|
||||||
|
- "--providers.file.watch=true"
|
||||||
|
- "--entrypoints.web.address=:80"
|
||||||
|
- "--log.filepath=/var/log/traefik/traefik.log"
|
||||||
|
- "--log.level=debug"
|
||||||
|
- "--accesslog=true"
|
||||||
|
- "--accesslog.filepath=/var/log/traefik/access.log"
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 8080:8080
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- ./traefik/logs:/var/log/traefik
|
||||||
|
- ./traefik/letsencrypt:/letsencrypt
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=false"
|
||||||
|
networks:
|
||||||
|
- european-airports/web
|
||||||
|
- dev
|
||||||
|
|
||||||
|
# Database GUI
|
||||||
|
phpmyadmin:
|
||||||
|
container_name: phpmyadmin
|
||||||
|
image: phpmyadmin
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- PMA_HOST=database
|
||||||
|
- PMA_PMADB=phpmyadmin
|
||||||
|
labels:
|
||||||
|
- "traefik.http.routers.phpmyadmin.rule=Host(`pma.${BASE_URL}`)"
|
||||||
|
- "traefik.http.routers.phpmyadmin.entrypoints=web"
|
||||||
|
- "traefik.docker.network=development"
|
||||||
|
networks:
|
||||||
|
- european-airports/backend
|
||||||
|
- dev
|
||||||
|
|
||||||
|
|
||||||
|
networks:
|
||||||
|
|
||||||
|
# European-Airports services, that will be exposed to the internet
|
||||||
|
european-airports/web:
|
||||||
|
name: "european-airports/web"
|
||||||
|
external: true
|
||||||
|
|
||||||
|
# European-Airports services that are not exposed to the internet.
|
||||||
|
european-airports/backend:
|
||||||
|
name: "european-airports/backend"
|
||||||
|
external: true
|
||||||
|
|
||||||
|
# Services that are used for development purposes. Exposed to the internet.
|
||||||
|
dev:
|
||||||
|
name: "development"
|
||||||
|
driver: bridge
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
backend-nginx:
|
backend-nginx:
|
||||||
container_name: european-airports_api-nginx
|
container_name: european-airports_api-nginx
|
||||||
build:
|
build:
|
||||||
|
|
@ -38,8 +38,8 @@ services:
|
||||||
NGINX_VERSION: ${NGINX_VERSION}
|
NGINX_VERSION: ${NGINX_VERSION}
|
||||||
image: european-airports/api-nginx
|
image: european-airports/api-nginx
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
# ports:
|
||||||
- 8080:80
|
# - 8080:80
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend-php
|
- backend-php
|
||||||
env_file:
|
env_file:
|
||||||
|
|
@ -50,7 +50,14 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- web
|
- web
|
||||||
|
labels:
|
||||||
|
- "traefik.http.routers.backend-nginx.rule=Host(`api.${BASE_URL}`)"
|
||||||
|
- "traefik.http.routers.backend-nginx.entrypoints=web"
|
||||||
|
- "traefik.http.routers.backend-nginx-secure.rule=Host(`api.${BASE_URL}`)"
|
||||||
|
- "traefik.http.routers.backend-nginx-secure.tls.certresolver=https-resolver"
|
||||||
|
- "traefik.http.routers.backend-nginx-secure.entrypoints=websecure"
|
||||||
|
- "traefik.docker.network=european-airports/web"
|
||||||
|
|
||||||
backend-php:
|
backend-php:
|
||||||
container_name: european-airports_api-php
|
container_name: european-airports_api-php
|
||||||
build:
|
build:
|
||||||
|
|
@ -71,6 +78,8 @@ services:
|
||||||
secrets:
|
secrets:
|
||||||
- eaBackendUser
|
- eaBackendUser
|
||||||
- eaBackendPw
|
- eaBackendPw
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=false"
|
||||||
|
|
||||||
frontend-nginx:
|
frontend-nginx:
|
||||||
container_name: european-airports_www-nginx
|
container_name: european-airports_www-nginx
|
||||||
|
|
@ -80,8 +89,8 @@ services:
|
||||||
NGINX_VERSION: ${NGINX_VERSION}
|
NGINX_VERSION: ${NGINX_VERSION}
|
||||||
image: european-airports/www-nginx
|
image: european-airports/www-nginx
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
# ports:
|
||||||
- 8081:80
|
# - 8081:80
|
||||||
depends_on:
|
depends_on:
|
||||||
- frontend-php
|
- frontend-php
|
||||||
env_file:
|
env_file:
|
||||||
|
|
@ -91,7 +100,13 @@ services:
|
||||||
- ./frontend/src/:/var/www/html
|
- ./frontend/src/:/var/www/html
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
|
labels:
|
||||||
|
- "traefik.http.routers.frontend-nginx.rule=Host(`www.${BASE_URL}`)"
|
||||||
|
- "traefik.http.routers.frontend-nginx.entrypoints=web"
|
||||||
|
- "traefik.http.routers.frontend-nginx-secure.rule=Host(`www.${BASE_URL}`)"
|
||||||
|
- "traefik.http.routers.frontend-nginx-secure.tls.certresolver=https-resolver"
|
||||||
|
- "traefik.http.routers.frontend-nginx-secure.entrypoints=websecure"
|
||||||
|
|
||||||
frontend-php:
|
frontend-php:
|
||||||
container_name: european-airports_www-php
|
container_name: european-airports_www-php
|
||||||
build:
|
build:
|
||||||
|
|
@ -107,6 +122,8 @@ services:
|
||||||
- ./frontend/src/:/var/www/html
|
- ./frontend/src/:/var/www/html
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=false"
|
||||||
|
|
||||||
database:
|
database:
|
||||||
container_name: european-airports_mariadb
|
container_name: european-airports_mariadb
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue