services: frontend: container_name: ca-lose-frontend hostname: lose-verkaufen build: ./frontend networks: ca-lose-internal: ipv4_address: 172.25.0.10 restart: unless-stopped backend: container_name: ca-lose-backend build: ./backend environment: NODE_ENV: production DB_HOST: ca-lose-mysql DB_USER: root DB_PASSWORD: ${DB_PASSWORD} DB_NAME: ca_lose depends_on: - database networks: ca-lose-internal: ipv4_address: 172.25.0.11 restart: unless-stopped database: container_name: ca-lose-mysql image: mysql:8.0 restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} MYSQL_DATABASE: ca_lose TZ: Europe/Berlin volumes: - ca-lose_mysql:/var/lib/mysql - ./mysql-timezone.cnf:/etc/mysql/conf.d/timezone.cnf:ro networks: - ca-lose-internal dns: container_name: ca-lose-dns image: jpillora/dnsmasq restart: unless-stopped volumes: - ./dnsmasq.conf:/etc/dnsmasq.conf:ro networks: ca-lose-internal: ipv4_address: 172.25.0.5 wireguard: image: lscr.io/linuxserver/wireguard:latest container_name: ca-lose-wireguard cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=Europe/Berlin - SERVERURL=dus3.the1s.de - SERVERPORT=51830 - PEERS=2 - PEERDNS=172.25.0.5 - INTERNAL_SUBNET=10.13.13.0 - ALLOWEDIPS=172.25.0.0/24 - PERSISTENTKEEPALIVE_PEERS=25 - LOG_CONFS=true - POST_UP=iptables -t nat -A POSTROUTING -s 10.13.13.0/24 -o eth0 -j MASQUERADE - POST_DOWN=iptables -t nat -D POSTROUTING -s 10.13.13.0/24 -o eth0 -j MASQUERADE volumes: - ./wireguard-config:/config - /lib/modules:/lib/modules ports: - 51830:51830/udp sysctls: - net.ipv4.conf.all.src_valid_mark=1 restart: unless-stopped networks: - ca-lose-internal - proxynet volumes: ca-lose_mysql: wireguard-data: networks: ca-lose-internal: driver: bridge ipam: config: - subnet: 172.25.0.0/24 proxynet: external: true