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
|
||||
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/>.
|
||||
|
||||
|
||||
# Configuration files
|
||||
config.php
|
||||
# Log files
|
||||
*.log
|
||||
|
||||
# Docker Secrets
|
||||
**/secrets/*_pw.txt
|
||||
|
||||
# Backup files
|
||||
*.bak
|
||||
|
||||
# Include all README files
|
||||
!**/README.md
|
||||
|
||||
|
|
@ -41,8 +44,6 @@ config.php
|
|||
.project
|
||||
.pydevproject
|
||||
|
||||
.bak
|
||||
|
||||
### WINDOWS ###
|
||||
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
|
||||
|
|
@ -38,8 +38,8 @@ services:
|
|||
NGINX_VERSION: ${NGINX_VERSION}
|
||||
image: european-airports/api-nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
# ports:
|
||||
# - 8080:80
|
||||
depends_on:
|
||||
- backend-php
|
||||
env_file:
|
||||
|
|
@ -50,6 +50,13 @@ services:
|
|||
networks:
|
||||
- backend
|
||||
- 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:
|
||||
container_name: european-airports_api-php
|
||||
|
|
@ -71,6 +78,8 @@ services:
|
|||
secrets:
|
||||
- eaBackendUser
|
||||
- eaBackendPw
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
|
||||
frontend-nginx:
|
||||
container_name: european-airports_www-nginx
|
||||
|
|
@ -80,8 +89,8 @@ services:
|
|||
NGINX_VERSION: ${NGINX_VERSION}
|
||||
image: european-airports/www-nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:80
|
||||
# ports:
|
||||
# - 8081:80
|
||||
depends_on:
|
||||
- frontend-php
|
||||
env_file:
|
||||
|
|
@ -91,6 +100,12 @@ services:
|
|||
- ./frontend/src/:/var/www/html
|
||||
networks:
|
||||
- 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:
|
||||
container_name: european-airports_www-php
|
||||
|
|
@ -107,6 +122,8 @@ services:
|
|||
- ./frontend/src/:/var/www/html
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
|
||||
database:
|
||||
container_name: european-airports_mariadb
|
||||
|
|
|
|||
Loading…
Reference in New Issue