Docker updates

This commit is contained in:
Joey Kimsey
2024-08-14 17:41:15 -04:00
parent 156f19ee97
commit b6767ae846
11 changed files with 191 additions and 139 deletions

View File

@ -4,15 +4,14 @@ volumes:
db-data:
services:
# Database Server
database:
ttp-database:
container_name: TTP-MySQL
image: mysql:8.0
ports:
- ${DOCKER_DB_PORT}:3306
environment:
MYSQL_ROOT_PASSWORD: ${DOCKER_DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_DATABASE: ${DOCKER_DB_DATABASE}
MYSQL_USER: ${DOCKER_DB_USERNAME}
MYSQL_PASSWORD: ${DOCKER_DB_PASSWORD}
volumes:
@ -23,7 +22,7 @@ services:
timeout: 10s
retries: 10
phpmyadmin:
ttp-phpmyadmin:
container_name: TTP-PhpMyAdmin
image: phpmyadmin:latest
ports:
@ -32,56 +31,27 @@ services:
environment:
PMA_HOST: database
depends_on:
database:
ttp-database:
condition: service_healthy
# NGINX
webone:
ttp-nginx:
container_name: TTP-Nginx
build:
context: .
dockerfile: ./docker/Dockerfile
target: nginx
volumes:
- ./:/var/www/html
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
dockerfile: ./docker/ttp-nginx/Dockerfile
target: php-fpm
ports:
- "8080:80"
links:
- php
depends_on:
- php
environment:
- APP_ENV=${APP_ENV}
# apache
webtwo:
ttp-apache:
container_name: TTP-Apache
build:
context: .
dockerfile: ./docker/Dockerfile
dockerfile: ./docker/ttp-apache/Dockerfile
target: apache
volumes:
- ./:/var/www/html
- ./docker/apache.conf:/etc/apache2/sites-available/000-default.conf
ports:
- "8000:80"
environment:
- APP_ENV=${APP_ENV}
depends_on:
- php
# php
php:
container_name: TTP-Php
build:
context: .
dockerfile: ./docker/Dockerfile
target: php-fpm
working_dir: /var/www/html
volumes:
- ./:/var/www/html
ports:
- "9000:9000"
environment:
- APP_ENV=${APP_ENV}
depends_on:
database:
condition: service_healthy