gitea not well configured

This commit is contained in:
Adrien Luxey 2020-05-07 12:47:05 +02:00
parent d481a60a80
commit 054afb5dc8
10 changed files with 82 additions and 50 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.retry
gitea_confs/

View File

@ -105,9 +105,9 @@ sites:
# mysql_username: mts
# mysql_password: "{{ vault_mts_mysql_password }}"
- slug: gitea_test # Shorthand name to use as directory/file name
- slug: gitea # Shorthand name to use as directory/file name
# The site URL (without www)
url: git.luxeylab.net
url: git.deuxfleurs.fr
# Ask nginx to redirect url to www
# Else, we redirect www to url
redirect_to_www: no
@ -116,12 +116,13 @@ sites:
# Subnet addresses
subnet_cidr_address: 172.27.6.0/24
subnet_gateway_ip: 172.27.6.1
# subnet_nginx_ip: 172.27.6.2
subnet_site_ip: 172.27.6.3
# User ID (git on remote)
subnet_site_ip: 172.27.6.2
# User IDs
user_name: git
user_uid: 1007
user_group: git
user_gid: 1006
# MySQL
mysql_database: gitea_test
mysql_username: gitea_test
mysql_password: "{{ vault_gitea_test_mysql_password }}"
mysql_database: gitea
mysql_username: gitea
mysql_password: "{{ vault_gitea_mysql_password }}"

View File

@ -1,38 +1,41 @@
$ANSIBLE_VAULT;1.1;AES256
64313133656432666630353732343865386336613536386135326132616366393761663936653565
3038656636653562353037643765333831656334343332310a313062353730333865383964376537
30393232616663626336616638373136316130336332626632633132643764613034333838653361
3563393837396232370a636232646566353261356333333137386234313661633238626263313535
36326239633339663035303165333239346530373332393431396462326266366536623566656630
35313335313836656239333137363337353833333333343732353138313638336662613733333032
61353033343934343066333235336466373665353964316136316534666135353538353562316238
32613861636336376533356535656134333934653834336136303364313335353061373738343232
62663238383535653637616532353662343061353236396231346365346339353964663962646233
61376535306166353261386163386362356137653962386338633631383738326164646235356532
34333665393963306130393832343834353132623035363739323736396531353462633331653135
31333262303433633434653430616363663932333830363163393362376437636163376162326338
64613431336631333033663966346438386632326461633934393433643864343061363239383338
36663938623661343535643663646661643335616431616364646535663735396639353239353936
30356166643630316564663137393666666635666466356661363039666436346136613032393034
62326563313061316466666430366163396537663262303562386265353938373833393531636437
37346331353364366436666531656534323332353439373935623835646363633330636232396137
35666466316134613538376166633863656332616332613130613134633362643839343131366332
61343630653865353236383532353736626530343332626138323636346239356235303037636565
64363438343435313232363035643462653736323362323636383062333335336531626366363431
35616631386539306436333733656530626637616533343164343035316165366138373363613930
30373136316562306530376633653431346463663162383466643933306133633132383961343432
35336533623735633135623332366136323563366136633761633137363664393563386462303864
39633163333636386563303162366537386237646635373666653662633239343532663061363536
34626338616638666266323637333630353262376135613237313738383965386539636365306162
32366335666438383632326139386561303937613138386666396538333034336235373063613863
39383238346561653236663464306332363461663933633462636432383639363632393130633965
33356633616462336637396432646633343535383133353065616630303736323335623439313932
66633030643664326662636264323234623064376464333838363039353234343138373732633533
30653761306131386430613838383538306564636361633838326636383636383539313465656135
32626264353534366565306236623361353331623036613137623332636366653331333534623035
31313731363263323063656264663632636265393639633765366435623333313937313065303231
32656239663961333430613161346435333438616662613735313862666239636561326566353139
35643965393263353865356637383664316166333839633738373861383535343337663466396563
32393563613730636438393539323561393962366532646138633131376364383862653437393037
37343634333233393135643939396361626135353435666466393664666335623533636337626436
3632
37643162316436636531313764666364353461376363343862326162326434343231643938373537
6436343861663038356133386636346466376532643337340a333965323034373833356364633039
39663261343836653266306339376463356333313231386562633730376365656139343633343530
3534376233373134300a313130323038613062386238303334386637333239363036363531643066
30613937363661343866383835393235343235383731626361356633353735313336396336313233
65396332626238306230323636363130636337333464643666636632393662643064363837633036
66336536303663343734326335663333343663633338393263366661323461333866336264376166
63646662356135663839353165666636393362393833313633346638613966366535333561383261
33633863313736666339333037643764323839366530316237323061396432336333646431336231
39623262323062656565313235393366636334663336636438613761303032613830623035643933
32663661393337313733393733303230383135303138393362363263333861356438616333626635
62646365303936363130616236326363663130633630343734656239663763613637326231306334
33323436653834366664643836346130616263616633363164633366316263653837333431373764
37326261616234633830656134636434653832393966393639613466333337303039333831666366
63333733346238386564643235616631613331366432373134336361663166616133666463623835
61346138306463663034396339393234343236346538396631303737316139393632633033653030
33613530393466636664306264623732623133383537656538643631366130326261393764616635
39316335656463323231396165336630366533373637396366363231373564336461663831646263
30373735376532323361616337613933333961313837313235383366383363363537313635316566
38653164623866376465333534346666356562633434303038666535376535383466623634396630
31633238613765306635663934633830353430366538313033643339333438303633646534303163
31636261386562393035656135393134323530336633656333353865363363633238336431613232
38633832663431653463373938346538656562393137313664313864613062383134383161616262
65383762633461633933326338326432666339633863383162356364656165333365633936656131
30333636326535663133303261393261353032386261396132373761376238333331383239656636
35623736616430653737316266346133626361323238383465383538356337363566396562653735
37396331336161373731326438623831363162393365353136343134353738396533626365316266
61613337613033653234343865363530353163643137623934366534393664323463633832376537
33616163613336376635383635303663613738353361656532646663653334616166373366643461
33613533623337323535613135643032393739393531383139333962356436646163633962303963
37383666613437333334306266343965393663396439633863356239333230333263636235333862
33663037366636653031666230346631333161633136363230396561616462363338313362356466
30333833386130306634633463336165373865663837303033616137373264346666343962626432
64333566366166323763316333323336643538623135643235666234323831393336393664646139
62326136323466633761336230313764393863343638383938643466323939666264376463383537
32623534336138653434613031396635383537663530653561366165346438616633326464363035
39306233326539656639346632386262323864333032326631303237306465666665663232313830
65353535613338313239343430353930313866653733376631616130383762623662323338396637
66383236616236386538396166643132303636363764353131633635373236353061353032353930
39383830326463343062

View File

@ -12,6 +12,7 @@
stat:
path: "{{ site_data_path }}/index.php"
register: wpcontent
tags: bootstrap
- name: Populate wp-content folder
block:

View File

@ -12,6 +12,8 @@ services:
environment:
APP_NAME: "Gitea: git with a cup of coffee"
DOMAIN: "{{ site.url }}"
SSH_DOMAIN: "{{ site.url }}"
ROOL_URL: "https://{{ site.url }}/"
USER_UID: "{{ site.user_uid }}"
USER_GID: "{{ site.user_gid }}"
DB_TYPE: mysql
@ -21,6 +23,7 @@ services:
DB_NAME: "{{ site.mysql_database }}"
volumes:
- "{{ site_data_path }}:/data"
- "/home/git/.ssh:/data/git/.ssh"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
networks:

View File

@ -24,7 +24,7 @@ server {
server_name {{ site.url }} www.{{ site.url }};
access_log /var/log/nginx/{{ site.slug }}-access.log;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/{{ site.slug }}-error.log;
{% if site.redirect_to_www %}
# Redirect non-www to www

View File

@ -1,3 +1,4 @@
---
# Needs variables:
# - site: dict describing the site install (cf group_vars/all/vars.yml)

View File

@ -0,0 +1,11 @@
---
# Needs variables:
# - site: dict describing the site install (cf group_vars/all/vars.yml)
- name: Include docker tasks
include_tasks: docker.yml
tags: docker
- name: Include nginx tasks
include_tasks: nginx.yml
tags: nginx

View File

@ -1,7 +1,7 @@
---
- name: Deploy Wordpress sites
include_tasks: deploy.yml
include_tasks: wordpress.yml
loop: "{{ sites }}"
loop_control:
loop_var: site
@ -9,7 +9,7 @@
tags: wordpress
- name: Deploy Drupal sites
include_tasks: deploy.yml
include_tasks: drupal.yml
loop: "{{ sites }}"
loop_control:
loop_var: site
@ -17,9 +17,9 @@
tags: drupal
- name: Deploy Gitea sites
include_tasks: deploy.yml
include_tasks: gitea.yml
loop: "{{ sites }}"
loop_control:
loop_var: site
when: site.type == "gitea"
tags: gitea
tags: gitea

View File

@ -0,0 +1,11 @@
---
# Needs variables:
# - site: dict describing the site install (cf group_vars/all/vars.yml)
- name: Include nginx tasks
include_tasks: nginx.yml
tags: nginx
- name: Include docker tasks
include_tasks: docker.yml
tags: docker