Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netmaker #313

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ POSTGRES_DB=farm_device.db
# variables for pgadmin
PGADMIN_DEFAULT_EMAIL=fd@farmmonitor.ca
PGADMIN_DEFAULT_PASSWORD=farm_device

# variables for netmaker
# Netmaker client docker image tag
NETCLIENT_DOCKER_TAG="v0.17.1"
NETCLIENT_ACCESSTOKEN="changeme"
NETCLIENT_NAME=$TRAEFIK_DOMAIN
2 changes: 1 addition & 1 deletion device/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ alembic = "~=1.13.1"
gpiozero = "~=2.0"
netifaces = "~=0.11.0"
click = "~=8.1.3"
psutil = "~=5.9.3"
psutil = "~=5.9.4"
pika = "~=1.3"
celery = "~=5.3"
multiprocessing-logging = "~=0.3.3"
Expand Down
19 changes: 19 additions & 0 deletions device/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:

# traefik container configuration below
traefik:
image: traefik:latest
image: traefik:2.9
container_name: fd_traefik
networks:
- farm_device
Expand Down Expand Up @@ -105,12 +105,28 @@ services:
- traefik.enable=true
- traefik.http.services.fd_pgadmin.loadbalancer.server.port=80
- traefik.http.routers.fd_pgadmin.service=fd_pgadmin

netmaker_client:
container_name: fd_netmaker_client
image: gravitl/netclient:${NETCLIENT_DOCKER_TAG}
networks:
- farm_device
restart: always
environment:
NETCLIENT_ACCESSTOKEN: ${NETCLIENT_ACCESSTOKEN}
NETCLIENT_NAME: ${NETCLIENT_NAME}
volumes:
- netclient:/etc/netclient
labels:
- custom.label=farm_device


volumes:
logs:
dbdata:
pgadmin:
traefik:
netclient:

networks:
farm_device:
Expand Down
Loading