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
|
||||
RUN a2enmod proxy_http headers
|
||||
|
||||
COPY public/ /var/www/html/
|
||||
|
||||
EXPOSE 80
|
@ -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
|
||||
|
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:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user