Comments (8)
Hi @alexfornuto
You can define all params via env variable by following the pattern REPLICA_ where the promertyname must be all UPPERCASE and must not have any spaces.
Env replacement in the config file should be supported by the used config library.
But in your case you use ${USER} in the config file and define env ORIGIN_USERNAME in the docker compose file.
from adguardhome-sync.
It was a PEBCAK error, typo in the domain name. My shame is now complete.
from adguardhome-sync.
You can define all params via env variable by following the pattern REPLICA_ where the promertyname must be all UPPERCASE and must not have any spaces.
Does that mean to pass insecureSkipVerify
in docker-compose.yaml
, it would look like ORIGIN_INSECURESKIPVERIFY
?
I think I defined my config files as you suggested:
from docker_compose.yaml
:
environment:
LOG_LEVEL: "debug"
ORIGIN_URL: "https://<ORIGIN-IP>:443"
ORIGIN_USERNAME: ${USER}
ORIGIN_INSECURESKIPVERIFY: true
ORIGIN_PASSWORD: ${PASSWORD}
From adguardhome-sync.yaml
:
origin:
insecureSkipVerify: true # disable tls check
username: ${USER}
password: ${PASSWORD}
From the logs:
2023-12-07T22:00:28.221Z INFO root cmd/root.go:125 Using config file:/config/adguardhome-sync.yaml
2023-12-07T22:00:28.226Z INFO sync sync/sync.go:38 AdGuardHome sync {"version": "v0.5.2", "build": "2023-11-23T07:13:51Z", "os": "linux", "arch": "amd64"}
2023-12-07T22:00:28.226Z DEBUG sync types/types.go:70 Using config {"config": {"origin":{"url":"https://<ORIGIN-IP>:443","apiPath":"/control","username":"a***x","password":"a***b","insecureSkipVerify":true,"autoSetup":false,"interfaceName":""},"replica":{"url":"http://192.168.1.100","apiPath":"/control","username":"a***x","password":"a***b","insecureSkipVerify":false,"autoSetup":false,"interfaceName":""},"cron":"*/10 * * * *","runOnStart":true,"api":{"port":8080},"features":{"dns":{"accessLists":true,"serverConfig":true,"rewrites":true},"dhcp":{"serverConfig":true,"staticLeases":true},"generalSettings":true,"queryLogConfig":true,"statsConfig":true,"clientSettings":true,"services":true,"filters":true}}}
2023-12-07T22:00:28.226Z INFO sync sync/sync.go:65 Setup cronjob {"cron": "*/10 * * * *", "next-execution": "2023-12-07T22:10:00.000Z"}
2023-12-07T22:00:28.226Z INFO sync sync/http.go:57 Starting API server {"port": 8080}
2023-12-07T22:00:28.226Z INFO sync sync/sync.go:75 Running sync on startup
2023-12-07T22:00:28.226Z DEBUG client client/client-methods.go:16 do get {"host": "<ORIGIN-IP>:443", "method": "GET", "path": "status", "username": "alex"}
2023-12-07T22:00:28.317Z DEBUG client client/client-methods.go:32 got response {"host": "<ORIGIN-IP>:443", "method": "GET", "path": "status", "username": "alex", "status": 403, "body": "Forbidden", "content-type": ["text/plain; charset=utf-8"]}
2023-12-07T22:00:28.317Z ERROR sync sync/sync.go:153 Error getting origin status {"from": "<ORIGIN-IP>:443", "error": "403 Forbidden(Forbidden)"}
from adguardhome-sync.
A brief update. I figured out how to insert hosts entries into containers, so I can use the .local
domain included in the certificate. That didn't change anything. What's interesting is that the paths sync is trying to get to don't seem to be accessible though curl
either:
❯ curl -k -u alex https://adguard.local/control
Enter host password for user 'alex':
404 page not found
❯ curl -k -u alex https://adguard.local/status
Enter host password for user 'alex':
404 page not found
❯ curl -k -u alex https://adguard.local/
Enter host password for user 'alex':
<!doctype html><html lang="en"><head>...
from adguardhome-sync.
- You do not need the config file if you define everything as env variables.
- The config file is still wrong. In the container is no env var with name PASSWORD nor USERNAME this is only known outside the docker container.
from adguardhome-sync.
A brief update. I figured out how to insert hosts entries into containers, so I can use the
.local
domain included in the certificate. That didn't change anything. What's interesting is that the paths sync is trying to get to don't seem to be accessible thoughcurl
either:❯ curl -k -u alex https://adguard.local/control Enter host password for user 'alex': 404 page not found ❯ curl -k -u alex https://adguard.local/status Enter host password for user 'alex': 404 page not found ❯ curl -k -u alex https://adguard.local/ Enter host password for user 'alex': <!doctype html><html lang="en"><head>...
In the sync log, you have a 403 meaning there's an issue with atuthentication, with curl there's 404 meaning not found.
So the url with curl might not point to the correct container.
from adguardhome-sync.
Welp. This turned out to be a PEBCAK error too shameful to detail here. Thanks for your patience and assistance. At least I learned more about how to configure this project along the way.
from adguardhome-sync.
@alexfornuto for other users it still might be helpful if you could describe your solution hete.
from adguardhome-sync.
Related Issues (20)
- Syncing of dhcpv4 options array and local_domain_name in the AdGuardHome.yaml HOT 3
- Continue on Error HOT 3
- Sync fails when replica url has port HOT 2
- Certificate signed by unknown authority HOT 4
- Question: Main vs Synced HOT 2
- Sync Stats HOT 1
- Safe Search Provider selection not syncing HOT 2
- Fail to sync when DNS use a file HOT 1
- Error getting origin status HOT 1
- New Feature: Status Indicators HOT 4
- Sync "Pause service blocking schedule" HOT 2
- 400 Bad Request Unknown Language HOT 4
- Error getting origin blocked services schedule HOT 3
- adguardhome-sync.yaml: no such file or directory HOT 4
- Adguard Sync Error 403 Forbidden HOT 10
- Different URL for instances on the UI HOT 6
- Proxy for AdGuard Status HOT 4
- Version Check HOT 1
- How to set Timezone? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adguardhome-sync.