CasaOS
CasaOS copied to clipboard
[Bug] ipv4 address get set to null inside apps
Describe the bug
Hi, I've been trying to set up a database along side a crafty instance. I modified the docker-compose.yml file inside to contain a mariadb instance, then created a network as well and assigned an ip address to both instances. It works on the first start of the compose file through the casaos webpage, but a couple hours later, the docker-compose file is overwritten and the ipv4_address field gets replaced with null.
Original compose file
name: crafty
services:
crafty:
image: registry.gitlab.com/crafty-controller/crafty-4:latest
...
networks:
crafty:
ipv4_address: 10.5.0.4
...
database:
image: mariadb:10.7
...
networks:
crafty:
ipv4_address: 10.5.0.5
...
networks:
crafty:
name: crafty
ipam:
config:
- subnet: 10.5.0.0/16
default:
name: crafty_default
Modified compose file
name: crafty
services:
crafty:
image: registry.gitlab.com/crafty-controller/crafty-4:latest
...
networks:
crafty: null
...
database:
image: mariadb:10.7
...
networks:
crafty: null
...
networks:
crafty:
name: crafty
ipam:
config:
- subnet: 10.5.0.0/16
default:
name: crafty_default
To Reproduce
Steps to reproduce the behavior:
- Modify the docker-compose file as above to specify a custom network
- Assign the instances with static IP addresses
- Wait a little bit (Not to sure what causes this, maybe reloading the host?)
- Check the compose file. the network will be set to null, causing the instance to have an IP address assigned from DHCP
Expected behavior
The instances should persistently have an IP address assigned to them.
Desktop (please complete the following information):
- OS: Ubuntu 24.04.1 LTS
- Browser FireFox 131.0.3 (64-bit)
- Version Casaos v0.4.13
System Time
Local time: Mon 2024-11-11 09:56:32 UTC
Universal time: Mon 2024-11-11 09:56:32 UTC
RTC time: Mon 2024-11-11 09:56:32
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no