Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
6b7d883ea4 | ||
9318504d19 | |||
d71b7b06e2 | |||
413d061c13 |
4 changed files with 22 additions and 7 deletions
|
@ -20,7 +20,7 @@ WORKDIR /app
|
|||
COPY ./gmnd/__init__.py .
|
||||
COPY ./content content
|
||||
COPY ./cgi-bin cgi-bin
|
||||
COPY config.yml .
|
||||
COPY dockerconf.yml ./config.yml
|
||||
COPY --from=build-stage /app/certs certs
|
||||
EXPOSE 1965
|
||||
CMD ["python", "__init__.py", "--file", "./config.yml" ]
|
||||
|
|
|
@ -10,11 +10,8 @@ curl https://repo.mic.ke/PUBLIC.KEY | sudo apt-key add -
|
|||
curl https://repo.mic.ke/debian/debian-micke-unstable.list | sudo tee /etc/apt/sources.list.d/debian-micke-unstable.list
|
||||
sudo apt update && sudo apt install gmnd
|
||||
```
|
||||
Unless you are using resolvconf and systemd-resolvd, NetworkManager might empty /etc/resolv.conf when you remove the last tunnel. This step is optional, but recommended:
|
||||
```
|
||||
sudo apt install resolvconf
|
||||
sudo systemctl restart systemd-resolved.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
### RPM
|
||||
```
|
||||
|
|
15
dockerconf.yml
Normal file
15
dockerconf.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
# Uncomment below line to allow automtic directory indexing
|
||||
allow_dir_list: true
|
||||
# Below is default bas path for your content
|
||||
base_path: ./content
|
||||
# To allow connectiond from the outside, set listen address below
|
||||
listen_addr: '0.0.0.0'
|
||||
# To set debug logging, uncomment below line
|
||||
logg_level: 'DEBUG'
|
||||
# To enable cgi functionality, configure something like below
|
||||
cgi_registry:
|
||||
/envtest.*:
|
||||
- ./cgi-bin/envtest.sh
|
||||
server_cert: ./certs/cert.pem
|
||||
server_key: ./certs/cert.key
|
|
@ -44,7 +44,10 @@ class gMNd:
|
|||
|
||||
def read_config(self):
|
||||
with open(self.config_file) as configfile:
|
||||
config_dict = yaml.load(configfile, Loader=yaml.FullLoader)
|
||||
try:
|
||||
config_dict = yaml.load(configfile, Loader=yaml.FullLoader)
|
||||
except AttributeError:
|
||||
config_dict = yaml.safe_load(configfile)
|
||||
if 'allow_dir_list' in config_dict:
|
||||
self.allow_dir_list = config_dict['allow_dir_list']
|
||||
if 'base_path' in config_dict:
|
||||
|
|
Loading…
Add table
Reference in a new issue