Per-Arne Andersen
5 years ago
19 changed files with 3671 additions and 279 deletions
@ -0,0 +1,24 @@ |
|||||
|
version: "2.1" |
||||
|
services: |
||||
|
|
||||
|
server: |
||||
|
container_name: wg-manager |
||||
|
build: . |
||||
|
restart: always |
||||
|
sysctls: |
||||
|
net.ipv6.conf.all.disable_ipv6: 0 |
||||
|
cap_add: |
||||
|
- NET_ADMIN |
||||
|
#network_mode: host # Alternatively |
||||
|
ports: |
||||
|
- 11820:11820/udp |
||||
|
- 51800-51900:51800-51900/udp |
||||
|
- 8888:8888 |
||||
|
volumes: |
||||
|
- ./wg-manager:/config |
||||
|
environment: |
||||
|
HOST: 0.0.0.0 |
||||
|
PORT: 8888 |
||||
|
ADMIN_PASSWORD: admin |
||||
|
ADMIN_USERNAME: admin |
||||
|
WEB_CONCURRENCY: 2 |
@ -0,0 +1,32 @@ |
|||||
|
from sqlalchemy import * |
||||
|
from migrate import * |
||||
|
|
||||
|
|
||||
|
def upgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
server = Table('server', meta, autoload=True) |
||||
|
v6_address_server = Column('v6_address', VARCHAR, unique=True, nullable=True) |
||||
|
v6_address_server.create(server) |
||||
|
|
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
peer = Table('peer', meta, autoload=True) |
||||
|
v6_address_peer = Column('v6_address', VARCHAR, nullable=True) |
||||
|
v6_address_peer.create(peer) |
||||
|
except: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
def downgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
server = Table('server', meta, autoload=True) |
||||
|
server.c.v6_address.drop() |
||||
|
|
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
peer = Table('peer', meta, autoload=True) |
||||
|
peer.c.v6_address.drop() |
||||
|
except: |
||||
|
pass |
||||
|
|
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
from sqlalchemy import * |
||||
|
from migrate import * |
||||
|
|
||||
|
|
||||
|
def upgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
peer = Table('server', meta, autoload=True) |
||||
|
v6_subnet = Column('v6_subnet', INTEGER) |
||||
|
v6_subnet.create(peer) |
||||
|
except: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
def downgrade(migrate_engine): |
||||
|
try: |
||||
|
meta = MetaData(bind=migrate_engine) |
||||
|
peer = Table('server', meta, autoload=True) |
||||
|
peer.c.v6_subnet.drop() |
||||
|
except: |
||||
|
pass |
File diff suppressed because it is too large
Loading…
Reference in new issue