Skip to content

Commit 533ee4b

Browse files
authored
Merge pull request #1 from thcp/dev/start
Dev/start
2 parents f7abb1b + 361c31e commit 533ee4b

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DOMAIN=
2+
IPADDR=
3+
NFS_MOUNT=
4+
NFS_IPADDR=

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
deploy:
2+
for i in $(cat .env) ; do export $i; done
3+
docker stack deploy -c stack.yml --resolve-image=never pihole
4+
5+
remove:
6+
docker stack rm pihole

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# ph_swarm_nfs
22
pihole for swarm and nfs mount for raspberry
3+
4+
## Usage
5+
Copy `.env.example` to `.env`, insert your values and execute `make deploy`

stack.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "3"
2+
services:
3+
pihole:
4+
image: pihole/pihole:latest
5+
dns:
6+
- 127.0.0.1
7+
- 1.1.1.1
8+
ports:
9+
- "53:53/tcp"
10+
- "53:53/udp"
11+
- "67:67/udp"
12+
- "80:80/tcp"
13+
- "443:443/tcp"
14+
environment:
15+
ServerIP: "${IPADDR}"
16+
PROXY_LOCATION: pihole
17+
VIRTUAL_HOST: "${DOMAIN}"
18+
VIRTUAL_PORT: 80
19+
extra_hosts:
20+
- "${DOMAIN}:${IPADDR}"
21+
volumes:
22+
- pihole:/etc/pihole
23+
volumes:
24+
pihole:
25+
driver: local
26+
driver_opts:
27+
type: nfs
28+
o: "addr=${NFS_IPADDR},nolock,soft,rw"
29+
device: ":${NFS_MOUNT}"

0 commit comments

Comments
 (0)