feat: new style in prod
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
- name: Set up real host.
|
||||
gather_facts: false
|
||||
hosts: localhost
|
||||
tags:
|
||||
- deploy
|
||||
vars_files:
|
||||
- ../vault.yml
|
||||
- ../dist/terraform_outputs.yml
|
||||
@@ -51,6 +53,21 @@
|
||||
- ../vault.yml
|
||||
- ../dist/terraform_outputs.yml
|
||||
tasks:
|
||||
- name: Install PIP.
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- python3-pip
|
||||
state: present
|
||||
|
||||
- name: Install needed packages.
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- botocore
|
||||
- boto3
|
||||
- packaging
|
||||
state: present
|
||||
break_system_packages: true
|
||||
|
||||
- name: Download Docker repository key.
|
||||
ansible.builtin.apt_key:
|
||||
url: https://download.docker.com/linux/debian/gpg
|
||||
@@ -92,6 +109,8 @@
|
||||
|
||||
- name: Deploy artifact to instance.
|
||||
hosts: server
|
||||
tags:
|
||||
- deploy
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../variables.yml
|
||||
@@ -129,6 +148,7 @@
|
||||
memory_swap: 900m
|
||||
ports: [80:80, 443:443, "22:22"]
|
||||
env:
|
||||
# Secrets.
|
||||
GITEA__security__INTERNAL_TOKEN: "{{ secret.internal }}"
|
||||
GITEA__server__LFS_JWT_SECRET: "{{ secret.lfs }}"
|
||||
GITEA__oauth2__JWT_SECRET: "{{ secret.jwt }}"
|
||||
@@ -137,10 +157,22 @@
|
||||
GITEA__server__DOMAIN: "{{ server_fqdn.value }}"
|
||||
GITEA__server__ROOT_URL: "https://{{ server_fqdn.value }}/"
|
||||
|
||||
# General S3 storage information.
|
||||
GITEA__storage__MINIO_BUCKET: "{{ secret.bucket.name }}"
|
||||
GITEA__storage__MINIO_ENDPOINT: "{{ secret.bucket.endpoint }}"
|
||||
GITEA__storage__MINIO_ACCESS_KEY_ID: "{{ secret.bucket.access_key }}"
|
||||
GITEA__storage__MINIO_SECRET_ACCESS_KEY: "{{ secret.bucket.secret_key }}"
|
||||
|
||||
# Set storage to specific S3 bucket path.
|
||||
GITEA__storage_0x2E_attachments__MINIO_BASE_PATH: "{{ secret.storage.key }}/attachments"
|
||||
GITEA__storage_0x2E_lfs__MINIO_BASE_PATH: "{{ secret.storage.key }}/lfs"
|
||||
GITEA__storage_0x2E_avatars__MINIO_BASE_PATH: "{{ secret.storage.key }}/avatars"
|
||||
GITEA__storage_0x2E_repo_0X2D_archive___MINIO_BASE_PATH: "{{ secret.storage.key }}/repo-archive"
|
||||
GITEA__storage_0x2E_repo_0X2D_avatars__MINIO_BASE_PATH: "{{ secret.storage.key }}/repo-avatars"
|
||||
GITEA__storage_0x2E_packages__MINIO_BASE_PATH: "{{ secret.storage.key }}/packages"
|
||||
GITEA__storage_0x2E_actions_log__MINIO_BASE_PATH: "{{ secret.storage.key }}/actions_log"
|
||||
GITEA__storage_0x2E_actions_artifacts__MINIO_BASE_PATH: "{{ secret.storage.key }}/actions_artifacts"
|
||||
|
||||
labels:
|
||||
docker-volume-backup.stop-during-backup: "true"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user