Cleared out some old roles and installed searxng
This commit is contained in:
@@ -1 +0,0 @@
|
||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
@@ -1,53 +0,0 @@
|
||||
- name: Create service user
|
||||
user:
|
||||
name: git
|
||||
password_lock: yes
|
||||
generate_ssh_key: yes
|
||||
ssh_key_type: rsa
|
||||
ssh_key_comment: Gitea Host Key
|
||||
register: service_user
|
||||
become: true
|
||||
|
||||
- name: Add user git's ssh key to its own authorized_key file
|
||||
ansible.posix.authorized_key:
|
||||
user: git
|
||||
key: "{{ service_user.ssh_public_key }}"
|
||||
become: true
|
||||
|
||||
- name: Set authorized_key file permissions
|
||||
file:
|
||||
path: "/home/{{ service_user.name }}/.ssh/authorized_keys"
|
||||
mode: 0600
|
||||
become: true
|
||||
|
||||
- name: Install SSH shim script
|
||||
copy:
|
||||
src: ssh_shim.sh
|
||||
dest: /usr/local/bin/gitea
|
||||
owner: "{{ service_user.uid }}"
|
||||
group: "{{ service_user.group }}"
|
||||
mode: 0711
|
||||
become: true
|
||||
|
||||
- name: Create install directory
|
||||
file:
|
||||
path: "{{ install_directory }}/{{ role_name }}"
|
||||
state: directory
|
||||
owner: "{{ docker_user }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Copy docker-compose file to destination
|
||||
template:
|
||||
src: docker-compose.yml
|
||||
dest: "{{ install_directory }}/{{ role_name }}/docker-compose.yml"
|
||||
owner: "{{ docker_user }}"
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
validate: docker-compose -f %s config
|
||||
become: true
|
||||
|
||||
- name: Start docker container
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ install_directory }}/{{ role_name }}"
|
||||
pull: true
|
||||
remove_orphans: yes
|
@@ -1,55 +0,0 @@
|
||||
version: "{{ docker_compose_version }}"
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
default:
|
||||
external: false
|
||||
|
||||
services:
|
||||
gitea:
|
||||
container_name: gitea
|
||||
image: gitea/gitea:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- traefik
|
||||
- default
|
||||
ports:
|
||||
- "127.0.0.1:2222:22"
|
||||
environment:
|
||||
- "USER_UID={{ service_user.uid }}"
|
||||
- "USER_GID={{ service_user.group }}"
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=db:5432
|
||||
- GITEA__database__NAME=gitea
|
||||
- GITEA__database__USER=gitea
|
||||
- GITEA__database__PASSWD=gitea
|
||||
- GITEA__server__START_SSH_SERVER=true
|
||||
- GITEA__server__BUILTIN_SSH_SERVER_USER=git
|
||||
- GITEA__server__SSH_LISTEN_PORT=2222
|
||||
- "GITEA__server__DOMAIN=git.{{ personal_domain }}"
|
||||
- "GITEA__server__ROOT_URL=https://git.{{ personal_domain }}"
|
||||
- GITEA__server__LANDING_PAGE=explore
|
||||
volumes:
|
||||
- "{{ data_dir }}/gitea:/data"
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /home/git/.ssh:/data/git/.ssh # For SSH passthrough
|
||||
labels:
|
||||
traefik.enable: true
|
||||
traefik.http.routers.gitea.rule: "Host(`git.{{ personal_domain }}`)"
|
||||
traefik.http.services.gitea.loadbalancer.server.port: 3000
|
||||
|
||||
db:
|
||||
image: postgres:14-alpine
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- default
|
||||
environment:
|
||||
- POSTGRES_USER=gitea
|
||||
- POSTGRES_PASSWORD=gitea
|
||||
- POSTGRES_DB=gitea
|
||||
volumes:
|
||||
- "{{ data_dir }}/postgres/gitea:/var/lib/postgresql/data"
|
Reference in New Issue
Block a user