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 COPY config/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod proxy_http headers RUN a2enmod proxy_http headers
COPY public/ /var/www/html/
EXPOSE 80

View File

@ -2,7 +2,10 @@
services: services:
db: db:
image: mariadb:10 build:
context: .
dockerfile: Dockerfile.db
image: sw1.self:5000/app-db
environment: environment:
MARIADB_ROOT_PASSWORD: admin MARIADB_ROOT_PASSWORD: admin
MARIADB_DATABASE: mydb MARIADB_DATABASE: mydb
@ -10,7 +13,6 @@ services:
MARIADB_PASSWORD: pass MARIADB_PASSWORD: pass
volumes: volumes:
- data:/var/lib/mysql - data:/var/lib/mysql
- ./initdb:/docker-entrypoint-initdb.d
networks: networks:
- int - int
deploy: deploy:
@ -26,11 +28,14 @@ services:
- int - int
web: web:
build: . build:
context: .
dockerfile: Dockerfile.web
image: sw1.self:5000/app-web image: sw1.self:5000/app-web
environment:
- VIRTUAL_HOST=sw.self
volumes: volumes:
- logs:/var/log/apache2 - logs:/var/log/apache2
- ./public:/var/www/html
networks: networks:
- int - int
- proxy - 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: services:
main: main:
image: nginxproxy/nginx-proxy image: nginxproxy/nginx-proxy:1.7
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/tmp/docker.sock
network: networks:
- proxy - proxy
ports: ports:
- 80:80 - 80:80