This commit is contained in:
Jephté Clain 2025-02-10 07:44:33 +04:00
parent 1fcedfa03f
commit 6a46dedf28
6 changed files with 25 additions and 7 deletions

View File

@ -0,0 +1,3 @@
FROM mariadb:10
COPY initdb/ /docker-entrypoint-initdb.d/

View File

@ -5,3 +5,7 @@ RUN docker-php-ext-install pdo pdo_mysql && \
COPY config/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod proxy_http headers
COPY public/ /var/www/html/
EXPOSE 80

View File

@ -2,7 +2,10 @@
services:
db:
image: mariadb:10
build:
context: .
dockerfile: Dockerfile.db
image: sw1.self:5000/app-db
environment:
MARIADB_ROOT_PASSWORD: admin
MARIADB_DATABASE: mydb
@ -10,7 +13,6 @@ services:
MARIADB_PASSWORD: pass
volumes:
- data:/var/lib/mysql
- ./initdb:/docker-entrypoint-initdb.d
networks:
- int
deploy:
@ -26,11 +28,14 @@ services:
- int
web:
build: .
build:
context: .
dockerfile: Dockerfile.web
image: sw1.self:5000/app-web
environment:
- VIRTUAL_HOST=sw.self
volumes:
- logs:/var/log/apache2
- ./public:/var/www/html
networks:
- int
- proxy

View File

@ -0,0 +1,3 @@
#!/bin/bash
docker network create -d overlay --attachable proxy

View File

@ -0,0 +1,3 @@
{
"insecure-registries": ["sw1.self:5000"]
}

View File

@ -2,10 +2,10 @@
services:
main:
image: nginxproxy/nginx-proxy
image: nginxproxy/nginx-proxy:1.7
volumes:
- /var/run/docker.sock:/var/run/docker.sock
network:
- /var/run/docker.sock:/tmp/docker.sock
networks:
- proxy
ports:
- 80:80