mirror of https://github.com/oxen-io/lokinet
Merge pull request #750 from michael-loki/docker-compose
WIP on docker-compose workflowpull/693/head
commit
23ffdf9286
@ -0,0 +1,19 @@
|
||||
ARG LOKINET_NETID=docker
|
||||
|
||||
FROM alpine:edge as builder
|
||||
|
||||
RUN apk update && \
|
||||
apk add build-base cmake git libcap-dev libcap-static libuv-dev libuv-static curl ninja bash binutils-gold
|
||||
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja STATIC_LINK=ON BUILD_TYPE=Release
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY ./docker/compose/bootstrap.ini /root/.lokinet/lokinet.ini
|
||||
COPY --from=builder /src/build/lokinet .
|
||||
|
||||
CMD ["./lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
@ -0,0 +1,76 @@
|
||||
# this configuration was auto generated with 'sane' defaults
|
||||
# change these values as desired
|
||||
|
||||
|
||||
[router]
|
||||
# number of crypto worker threads
|
||||
threads=4
|
||||
# path to store signed RC
|
||||
contact-file=/root/.lokinet/self.signed
|
||||
# path to store transport private key
|
||||
transport-privkey=/root/.lokinet/transport.private
|
||||
# path to store identity signing key
|
||||
ident-privkey=/root/.lokinet/identity.private
|
||||
# encryption key for onion routing
|
||||
encryption-privkey=/root/.lokinet/encryption.private
|
||||
|
||||
# uncomment following line to set router nickname to 'lokinet'
|
||||
#nickname=lokinet
|
||||
|
||||
|
||||
[logging]
|
||||
level=info
|
||||
# uncomment for logging to file
|
||||
#type=file
|
||||
#file=/path/to/logfile
|
||||
# uncomment for syslog logging
|
||||
#type=syslog
|
||||
|
||||
[metrics]
|
||||
json-metrics-path=/root/.lokinet/metrics.json
|
||||
|
||||
# admin api (disabled by default)
|
||||
[api]
|
||||
enabled=true
|
||||
#authkey=insertpubkey1here
|
||||
#authkey=insertpubkey2here
|
||||
#authkey=insertpubkey3here
|
||||
bind=127.0.0.1:1190
|
||||
|
||||
# system settings for privileges and such
|
||||
[system]
|
||||
user=lokinet
|
||||
group=lokinet
|
||||
pidfile=/root/.lokinet/lokinet.pid
|
||||
|
||||
# dns provider configuration section
|
||||
[dns]
|
||||
# resolver
|
||||
upstream=1.1.1.1
|
||||
bind=127.3.2.1:53
|
||||
|
||||
# network database settings block
|
||||
[netdb]
|
||||
# directory for network database skiplist storage
|
||||
dir=/netdb
|
||||
|
||||
# lokid settings (disabled by default)
|
||||
[lokid]
|
||||
enabled=false
|
||||
jsonrpc=127.0.0.1:22023
|
||||
#service-node-seed=/path/to/servicenode/seed
|
||||
|
||||
# network settings
|
||||
[network]
|
||||
profiles=/root/.lokinet/profiles.dat
|
||||
enabled=true
|
||||
exit=false
|
||||
#exit-blacklist=tcp:25
|
||||
#exit-whitelist=tcp:*
|
||||
#exit-whitelist=udp:*
|
||||
ifaddr=10.200.0.1/8
|
||||
ifname=loki-docker0
|
||||
|
||||
# ROUTERS ONLY: publish network interfaces for handling inbound traffic
|
||||
[bind]
|
||||
eth0=1090
|
@ -0,0 +1,59 @@
|
||||
version: '3.2'
|
||||
services:
|
||||
bootstrap-router:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/compose/bootstrap.Dockerfile
|
||||
image: bootstrap
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- "/dev/net/tun:/dev/net/tun"
|
||||
ports:
|
||||
- target: 1090
|
||||
protocol: udp
|
||||
mode: host
|
||||
- target: 1190
|
||||
protocol: tcp
|
||||
mode: host
|
||||
volumes:
|
||||
- bootstrap-dir:/root/.lokinet/
|
||||
environment:
|
||||
- LOKINET_NETID=docker
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
router:
|
||||
depends_on:
|
||||
- bootstrap-router
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/compose/router.Dockerfile
|
||||
image: router
|
||||
devices:
|
||||
- "/dev/net/tun:/dev/net/tun"
|
||||
ports:
|
||||
- target: 1090
|
||||
protocol: udp
|
||||
mode: host
|
||||
- target: 1190
|
||||
protocol: tcp
|
||||
mode: host
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- bootstrap-dir:/bootstrap/
|
||||
environment:
|
||||
- LOKINET_NETID=docker
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
volumes:
|
||||
bootstrap-dir:
|
||||
|
||||
networks:
|
||||
testing_net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
@ -0,0 +1,19 @@
|
||||
ARG LOKINET_NETID=docker
|
||||
|
||||
FROM alpine:edge as builder
|
||||
|
||||
RUN apk update && \
|
||||
apk add build-base cmake git libcap-dev libcap-static libuv-dev libuv-static curl ninja bash binutils-gold
|
||||
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
|
||||
RUN make NINJA=ninja STATIC_LINK=ON BUILD_TYPE=Release
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY ./docker/compose/router.ini /root/.lokinet/lokinet.ini
|
||||
COPY --from=builder /src/build/lokinet .
|
||||
|
||||
CMD ["./lokinet"]
|
||||
EXPOSE 1090/udp 1190/tcp
|
@ -0,0 +1,82 @@
|
||||
# this configuration was auto generated with 'sane' defaults
|
||||
# change these values as desired
|
||||
|
||||
|
||||
[router]
|
||||
# number of crypto worker threads
|
||||
threads=4
|
||||
# path to store signed RC
|
||||
contact-file=/root/.lokinet/self.signed
|
||||
# path to store transport private key
|
||||
transport-privkey=/root/.lokinet/transport.private
|
||||
# path to store identity signing key
|
||||
ident-privkey=/root/.lokinet/identity.private
|
||||
# encryption key for onion routing
|
||||
encryption-privkey=/root/.lokinet/encryption.private
|
||||
|
||||
# uncomment following line to set router nickname to 'lokinet'
|
||||
#nickname=lokinet
|
||||
|
||||
|
||||
[logging]
|
||||
level=info
|
||||
# uncomment for logging to file
|
||||
#type=file
|
||||
#file=/path/to/logfile
|
||||
# uncomment for syslog logging
|
||||
#type=syslog
|
||||
|
||||
[metrics]
|
||||
json-metrics-path=/root/.lokinet/metrics.json
|
||||
|
||||
# admin api (disabled by default)
|
||||
[api]
|
||||
enabled=true
|
||||
#authkey=insertpubkey1here
|
||||
#authkey=insertpubkey2here
|
||||
#authkey=insertpubkey3here
|
||||
bind=127.0.0.1:1190
|
||||
|
||||
# system settings for privileges and such
|
||||
[system]
|
||||
user=lokinet
|
||||
group=lokinet
|
||||
pidfile=/root/.lokinet/lokinet.pid
|
||||
|
||||
# dns provider configuration section
|
||||
[dns]
|
||||
# resolver
|
||||
upstream=1.1.1.1
|
||||
bind=127.3.2.1:53
|
||||
|
||||
# network database settings block
|
||||
[netdb]
|
||||
# directory for network database skiplist storage
|
||||
dir=/netdb
|
||||
|
||||
# bootstrap settings
|
||||
[bootstrap]
|
||||
# add a bootstrap node's signed identity to the list of nodes we want to bootstrap from
|
||||
# if we don't have any peers we connect to this router
|
||||
add-node=/bootstrap/self.signed
|
||||
|
||||
# lokid settings (disabled by default)
|
||||
[lokid]
|
||||
enabled=false
|
||||
jsonrpc=127.0.0.1:22023
|
||||
#service-node-seed=/path/to/servicenode/seed
|
||||
|
||||
# network settings
|
||||
[network]
|
||||
profiles=/root/.lokinet/profiles.dat
|
||||
enabled=true
|
||||
exit=false
|
||||
#exit-blacklist=tcp:25
|
||||
#exit-whitelist=tcp:*
|
||||
#exit-whitelist=udp:*
|
||||
ifaddr=10.200.0.1/8
|
||||
ifname=loki-docker0
|
||||
|
||||
# ROUTERS ONLY: publish network interfaces for handling inbound traffic
|
||||
[bind]
|
||||
eth0=1090
|
Loading…
Reference in New Issue