Back

[SOLVED] Fixing network subnet

  • 0
  • Self Hosted
MyWay
9 Sep, 2023, 07:32

Hi, how to set a fixed subnet for docker networks used by appwrite? I'm asking so I can set that subnet allowed on my firewall

TL;DR
Title: [SOLVED] Fixing network subnet Solution: Create a docker-compose.override.yml file with the desired subnet configuration for the networks. Launch docker-compose using the -f flag followed by the docker-compose.override.yml file. This will ensure that the network subnet is fixed. It is recommended to keep any customizations in the docker-compose.override.yml file to preserve them during upgrades.
Drake
9 Sep, 2023, 15:49

This would be some docker compose setting. Maybe this will help: https://stackoverflow.com/questions/46845381/how-do-configure-docker-compose-to-use-a-given-subnet-if-a-variable-is-set-or-c

Something really important, though, is I highly suggest leaving the docker-compose.yml file created by Appwrite unchanged and put any customizations you need in a docker-compose.override.yml file so that upgrades can wipe the docker-compose.yml file and your customizations would be fine

MyWay
11 Sep, 2023, 12:24

Hi Steven, thanks for your answer. I'll think about the best solution to both avoid issues with the firewall due to network changes and appwrite updates 🤔

MyWay
16 Sep, 2023, 10:38

I created a docker-compose.override.yml like you suggested, with this content, so if somebody has the same issue:

networks: appwrite: name: appwrite ipam: config: - subnet: 172.21.46.0/24 gateway: name: gateway ipam: config: - subnet: 172.21.47.0/24

Then launched using -f docker-compose.override.yml and seems to work fine, thanks

Drake
16 Sep, 2023, 14:47

btw, docker compose up -d should use Burger the regular and override compose files automatically

Drake
16 Sep, 2023, 14:50

[SOLVED] Fixing network subnet

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more