Compare commits

...

4 Commits

Author SHA1 Message Date
Elizabeth Hunt bf25507335 fix drone cpu limit 2024-03-26 18:50:03 -04:00
Elizabeth Hunt 2663f4dda9 add hatecomputers.club main page role 2024-03-26 18:49:53 -04:00
Elizabeth Hunt 2a7c67899c set limits on drone 2024-03-26 18:31:37 -04:00
Elizabeth Hunt 061ae56381 fix drone ci 2024-03-26 18:24:48 -04:00
12 changed files with 91 additions and 1 deletions

View File

@ -26,3 +26,6 @@
- name: CI
ansible.builtin.import_playbook: playbooks/deploy-drone.yml
- name: Website for hatecomputers.club
ansible.builtin.import_playbook: playbooks/deploy-hatecomputers-club.yml

View File

@ -2,3 +2,7 @@
drone_gitea_server: "https://git.hatecomputers.club"
drone_server_host: "https://ci.hatecomputers.club"
drone_admin_username: "gitea_admin"
drone_cpu_set: "1"
drone_memory_limit: "1000000000"
drone_workers: "2"

View File

@ -9,3 +9,4 @@ host_domains:
# - himmel.hatecomputers.club
- git.hatecomputers.club
- ci.hatecomputers.club
- hatecomputers.club

View File

@ -32,3 +32,6 @@ himmel.int.infra.hatecomputers.club ansible_user=root ansible_connection=ssh
[drone]
himmel.int.infra.hatecomputers.club ansible_user=root ansible_connection=ssh
[hatecomputers-club]
himmel.int.infra.hatecomputers.club ansible_user=root ansible_connection=ssh

View File

@ -0,0 +1,6 @@
---
- name: hatecomputers.club setup
hosts: hatecomputers-club
roles:
- hatecomputers-club

View File

@ -16,6 +16,7 @@ services:
- DRONE_SERVER_PROTO=https
- DRONE_SERVER_HOST={{ drone_server_host }}
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_USER_CREATE=username:{{ drone_admin_username }},admin:true
drone-runner:
container_name: drone_runner
image: drone/drone-runner-docker:latest
@ -26,4 +27,6 @@ services:
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_RPC_HOST=drone:80
- DRONE_RPC_PROTO=http
- DRONE_RUNNER_CAPACITY=4
- DRONE_RUNNER_CAPACITY={{ drone_workers }}
- DRONE_CPU_SET={{ drone_cpu_set }}
- DRONE_MEMORY_LIMIT={{ drone_memory_limit }}

View File

@ -0,0 +1,23 @@
---
- name: Ensure hatecomputers-club docker/compose exist
ansible.builtin.file:
path: /etc/docker/compose/hatecomputers-club
state: directory
owner: root
group: root
mode: 0700
- name: Build hatecomputers-club docker-compose.yml.j2
ansible.builtin.template:
src: docker-compose.yml.j2
dest: /etc/docker/compose/hatecomputers-club/docker-compose.yml
owner: root
group: root
mode: 0700
- name: Enable hatecomputers-club
ansible.builtin.systemd_service:
state: restarted
enabled: true
name: docker-compose@hatecomputers-club

View File

@ -0,0 +1,14 @@
version: '3'
services:
kanidm:
image: git.hatecomputers.club/hatecomputers/hatecomputers.club:main
restart: always
ports:
- 127.0.0.1:9696:8080
environment:
- CLOUDFLARE_TOKEN={{ cloudflare_api_token }}
- CLOUDFLARE_ZONE={{ cloudflare_zone_id }}
volumes:
- ./db:/app/db

View File

@ -0,0 +1,8 @@
server {
listen 80;
server_name hatecomputers.club;
location / {
rewrite ^ https://hatecomputers.club$request_uri? permanent;
}
}

View File

@ -17,5 +17,8 @@ server {
proxy_pass http://127.0.0.1:9966;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
client_max_body_size 500M; # docker images can get large :3
client_body_buffer_size 128k;
}
}

View File

@ -0,0 +1,21 @@
server {
server_name hatecomputers.club;
listen 443 ssl;
ssl_dhparam /etc/nginx/dhparams.pem;
ssl_session_timeout 1d;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_certificate /etc/letsencrypt/live/hatecomputers.club/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/hatecomputers.club/privkey.pem;
location / {
proxy_pass http://127.0.0.1:9696;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}

View File

@ -1,4 +1,5 @@
cloudflare_api_token
cloudflare_zone_id
certbot_email
email_ldap_api_token
roundcube_oauth2_client_id