Install git-mirror
container
This also moves the canonical home of this repo to my gitea instance!
This commit is contained in:
parent
5f9b337c7a
commit
82a3c85263
4 changed files with 31 additions and 1 deletions
|
@ -44,3 +44,13 @@ services:
|
||||||
- POSTGRES_DB=gitea
|
- POSTGRES_DB=gitea
|
||||||
- BACKUP_KEEP_MONTHS=1
|
- BACKUP_KEEP_MONTHS=1
|
||||||
- BACKUP_KEEP_WEEKS=1
|
- BACKUP_KEEP_WEEKS=1
|
||||||
|
|
||||||
|
git-mirror:
|
||||||
|
image: theorangeone/git-mirror:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./repositories.toml:/app/repositories.toml
|
||||||
|
environment:
|
||||||
|
- GITHUB_TOKEN={{ gitea.git_mirror_github_token }}
|
||||||
|
depends_on:
|
||||||
|
- gitea
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[[repository]]
|
||||||
|
source = "https://git.theorangeone.net/r/infrastructure"
|
||||||
|
destination = "https://$GITHUB_TOKEN@github.com/RealOrangeOne/infrastructure"
|
|
@ -35,6 +35,15 @@
|
||||||
register: gitea_config_file
|
register: gitea_config_file
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Install git-mirror config file
|
||||||
|
template:
|
||||||
|
src: files/gitea/git-mirror-repositories.toml
|
||||||
|
dest: /opt/gitea/repositories.toml
|
||||||
|
mode: "{{ docker_compose_file_mask }}"
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
register: git_mirror_config_file
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Cycle gitea container
|
- name: Cycle gitea container
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /opt/gitea
|
project_src: /opt/gitea
|
||||||
|
@ -42,7 +51,7 @@
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
remove_volumes: true
|
remove_volumes: true
|
||||||
state: "{{ item }}"
|
state: "{{ item }}"
|
||||||
when: compose_file.changed or gitea_config_file.changed
|
when: compose_file.changed or gitea_config_file.changed or git_mirror_config_file.changed
|
||||||
loop:
|
loop:
|
||||||
- absent
|
- absent
|
||||||
- present
|
- present
|
||||||
|
|
|
@ -36,3 +36,11 @@ gitea:
|
||||||
6431663036333331350a303332366162333862616534346161316531323039643762316365333865
|
6431663036333331350a303332366162333862616534346161316531323039643762316365333865
|
||||||
35383235633166353930363034373235646466336530646463616661336361393835643533343534
|
35383235633166353930363034373235646466336530646463616661336361393835643533343534
|
||||||
3235316165373239633832316438303266343639356161303439
|
3235316165373239633832316438303266343639356161303439
|
||||||
|
git_mirror_github_token: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
65633837346566306438626237396538333164356539346565303862636638623664396664303430
|
||||||
|
3665646436373136313364613962383939633831663735650a366432393836366534336163626162
|
||||||
|
36616334376666376134363561386331376134393065353039356532356466646636626634306136
|
||||||
|
3930396265363130310a383430383461633036623136663738323063656664346233613837653933
|
||||||
|
39326639623466326436323135616337386362323065306466313032616166386536323131363730
|
||||||
|
3034666333393933313535313037326565393262623732306465
|
||||||
|
|
Loading…
Reference in a new issue