Replace minio with webdav for upload

Also made sure it all ran as the correct user
This commit is contained in:
Jake Howard 2021-05-04 14:08:08 +01:00
parent f62a1e8374
commit 3da14e67dd
Signed by: jake
GPG Key ID: 57AFB45680EDD477
3 changed files with 41 additions and 20 deletions

View File

@ -1,15 +1,14 @@
version: "2.3"
services:
upload:
image: minio/minio:latest
webdav:
image: theorangeone/webdav:latest
restart: unless-stopped
volumes:
- ./files:/data
command: server /data --quiet
- ./files:/srv
- ./htpasswd.txt:/etc/nginx/.htpasswd:ro
environment:
- MINIO_ACCESS_KEY={{ minio_access_key }}
- MINIO_SECRET_KEY={{ minio_secret_key }}
- PUID={{ docker_user.id }}
labels:
- traefik.enable=true
- traefik.http.routers.upload.rule=Host(`upload.theorangeone.net`)
@ -20,6 +19,8 @@ services:
restart: unless-stopped
volumes:
- ./files/img:/srv:ro
environment:
- PUID={{ docker_user.id }}
labels:
- traefik.enable=true
- traefik.http.routers.img.rule=Host(`img.theorangeone.net`) || Host(`img.0rng.one`)
@ -29,9 +30,10 @@ services:
image: theorangeone/static-server:latest
restart: unless-stopped
volumes:
- ./files/background:/srv:ro
- ./files/bg:/srv:ro
environment:
- FANCY_INDEX=on
- PUID={{ docker_user.id }}
labels:
- traefik.enable=true
- traefik.http.routers.bg.rule=Host(`bg.theorangeone.net`)
@ -41,7 +43,9 @@ services:
image: theorangeone/static-server:latest
restart: unless-stopped
volumes:
- ./files/download:/srv:ro
- ./files/dl:/srv:ro
environment:
- PUID={{ docker_user.id }}
labels:
- traefik.enable=true
- traefik.http.routers.dl.rule=Host(`dl.theorangeone.net`) || Host(`dl.0rng.one`)

View File

@ -18,3 +18,20 @@
validate: docker-compose -f %s config
notify: restart upload
become: true
- name: Create superuser
htpasswd:
path: /opt/upload/htpasswd.txt
name: jake
password: "{{ superuser_upload_password }}"
mode: 0640
owner: "{{ docker_user.name }}"
become: true
- name: Create nextcloud user
htpasswd:
path: /opt/upload/htpasswd.txt
name: nextcloud
password: "{{ nextcloud_upload_password }}"
mode: 0640
become: true

View File

@ -1,15 +1,4 @@
minio_access_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
66366462383561303039343639376633653161663339643834363865303839616636643066336232
6561326136393766356239616566316566663136313137320a643865373430363162656533626237
34383761326130666536326238353531366132623964663631663134333234323134646531356464
6536323939306134650a373137373563313636323435323934613265346334383064383266333238
33623233613132653965666165343562393363323936343437363437353965653432643364646636
36363937623164346162386236613231383665393461666438306532373264376339303231666532
39376463633739383762303535323634656337333331653961393663313462613731306164323633
33383561363461383261653836396662656662393666613236303930646231333639653933313162
39646662396131366138663863343533643966343866333031656339383034343231
minio_secret_key: !vault |
superuser_upload_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
63356130643562363439663563393639623238383562353861653635346566343036386439303836
3739346133396462333462633731366435353666336563350a626664363730653765373861376132
@ -20,3 +9,14 @@ minio_secret_key: !vault |
35653262313266633231646437366638646462366133653833633139383061326336343238363464
62393137303862353636333033323536393466326337373761396539316265333133356632363233
32366663303765303663633564633564323465633366333064393330666261646465
nextcloud_upload_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
36373734636338636332333730366564316432643566653063663664656262393261383030343339
3239373334666466326235383739336335326339393634650a336462303730313339393637333132
37653938613463353965396533326330626266643261656538356464303534663737303630373864
3761623163393130310a313736343763393264346566316332393634393036383632653930616663
62303934346366646262393261356636633131393762376438393363646663646263386634366664
33613332623135626437393130353966336563303364303536323537343765643063616166616639
63366565653037653432336265623863323039356436353631633830366334643037633237376361
38653934663762353563343431333664366662306531653562363065373431323565643931303563
65336666316138643130383231313961396666376239303533616561633863616135