Can't keep language files
megan-starr9 opened this issue · comments
Heyo!
So - I'm trying to keep my project light by letting the docker image handle the mybb install. however, this doesn't work because the extract overwrites all files within the destination. This means my language files get overwritten by the clean image files!
Would it be possible to add a flag to skip already present files on this line?
https://github.com/mybb/docker/blob/master/docker-entrypoint.sh#L10
By adding this flag:
https://stackoverflow.com/a/51171675
My docker setup would ideally look like the following:
version: '3.7'
services:
mybb:
build:
context: ./site
ports:
- 9000:9000
depends_on:
- mysql
volumes:
- ./site/inc/plugins:/var/www/html/inc/plugins
- ./site/inc/config.php:/var/www/html/inc/config.php
- ./site/inc/languages:/var/www/html/inc/languages
- site:/var/www/html
nginx:
build:
context: ./nginx
ports:
- 80:80
restart: on-failure
depends_on:
- mybb
volumes:
- site:/var/www/html:ro
mysql:
build:
context: ./mysql
command: --default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
restart: always
volumes:
- ./mysql/data:/var/lib/mysql
volumes:
site:
And when mybb installs, it ideally would not overwrite my desired config.php or language file updates! thanks!
@euantorano thanks a ton!!!
This is more than a bit of a blocker for me in a number of places ^^ so I went ahead and opened up a PR from a fork! I'll try and get it tested out in the next few days, but I set up an optional flag to not affect any current users
@euantorano don't want to be a bother, but pinging just let you know this exists! (In case you hadn't gotten to it yet or had forgotten)
#9
If that doesn't look like the solve y'all want for this, though, totally fine
Hey, sorry I’d totally forgotten about this. I’ll try and take a look.