bugs
This commit is contained in:
parent
1fcedfa03f
commit
6a46dedf28
3
docker-swarm/app/Dockerfile.db
Normal file
3
docker-swarm/app/Dockerfile.db
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM mariadb:10
|
||||||
|
|
||||||
|
COPY initdb/ /docker-entrypoint-initdb.d/
|
@ -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
|
@ -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
|
||||||
|
3
docker-swarm/create-network-proxy.sh
Executable file
3
docker-swarm/create-network-proxy.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker network create -d overlay --attachable proxy
|
3
docker-swarm/etc-docker-daemon.json
Normal file
3
docker-swarm/etc-docker-daemon.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"insecure-registries": ["sw1.self:5000"]
|
||||||
|
}
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user