Compare commits

...

504 Commits
master ... main

Author SHA1 Message Date
Sam A. e633ca13b4
Add hostname to Restic container 2024-03-29 21:01:50 +01:00
Víðir Valberg Guðmundsson 92ca044d06 Adding diun (#208)
Closes #174

Reviewed-on: data.coop/ansible#208
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2024-03-28 14:02:24 +00:00
Víðir Valberg Guðmundsson 41116063a2 Bump forgejo to 1.21.8. 2024-03-28 14:33:12 +01:00
valberg 1bfa6bdd1d Merge pull request 'Fix another instance of domain=>remote_domain' (#205) from fix-restic-domain into main
Reviewed-on: data.coop/ansible#205
Reviewed-by: valberg <valberg@orn.li>
2024-03-08 10:05:06 +00:00
Reynir Björnsson 9a03f71252 Fix another instance of domain=>remote_domain 2024-03-08 10:57:32 +01:00
reynir 00927a19df Merge pull request 'Rename variables to avoid name clash' (#204) from fix-restic-domain into main
Reviewed-on: data.coop/ansible#204
Reviewed-by: valberg <valberg@orn.li>
2024-03-06 12:40:47 +00:00
Reynir Björnsson a0988aa05d Rename variables to avoid name clash 2024-03-06 13:38:46 +01:00
Víðir Valberg Guðmundsson 4112bb73b6 Bump forgejo to 1.21.7. 2024-03-06 13:35:47 +01:00
Víðir Valberg Guðmundsson e30f1d57d5 Bump mastodon (deployed some time ago). 2024-03-06 13:32:50 +01:00
reynir ebf3608bdc Merge pull request 'Add uptime-kuma push url for restic' (#203) from restic-uptime-kuma into main
Reviewed-on: data.coop/ansible#203
2024-03-06 12:29:44 +00:00
Reynir Björnsson ce030b2dea Fixup yaml 2024-03-05 09:57:55 +01:00
Reynir Björnsson 4f129168c6 Add uptime-kuma push url for restic 2024-03-05 09:55:04 +01:00
Reynir Björnsson d468e49830 . 2024-03-04 14:15:52 +01:00
Reynir Björnsson ae497f0284 . 2024-03-04 13:30:58 +01:00
Reynir Björnsson ac64706fcb . 2024-03-04 12:48:51 +01:00
Reynir Björnsson 9fb16d3a69 Address comments by @samsapti
We need to use ':' instead of '=' in yaml for environment variable
bindings.
Spurious tab where it should be all spaces
Rename variable mail-from to mail_from to align with existing code style
Nit: change email addresses
2024-03-04 09:20:04 +01:00
Reynir Björnsson 6982d0feaa Restic: send an email on backup failure 2024-03-03 21:17:48 +01:00
Sam A. 1b68766cd6
Improv 2024-03-01 20:53:08 +01:00
Sam A. d90b769640 Merge pull request 'Add uptime kuma as a service we can deploy to a different host for monitoring.' (#196) from add_uptime_data_coop into main
Reviewed-on: data.coop/ansible#196
Reviewed-by: Sam A. <samsapti@noreply@git.data.coop>
2024-03-01 19:47:57 +00:00
Sam A. f792bf3dd1
Fixes and add Watchtower to Uptime Kuma instance 2024-02-29 20:45:59 +01:00
Víðir Valberg Guðmundsson 266f990d1a Pin forgejo to 1.21.6-0. 2024-02-22 20:44:55 +01:00
Víðir Valberg Guðmundsson 241d63494f Upgrade forgejo to 1.21. Closes #201. 2024-02-21 14:26:28 +01:00
Víðir Valberg Guðmundsson 4c65521447 Mastodon: Fix container name for crontab cleanup jobs 2024-02-21 13:36:31 +01:00
valberg a95c3ea17e Merge pull request 'Forgejo SMTP_ADDR was split into ditto + SMTP_PORT' (#200) from forgejo-smtp-port into main
Reviewed-on: data.coop/ansible#200
2024-02-21 11:19:01 +00:00
Reynir Björnsson 590597b137 Forgejo SMTP_ADDR was split into ditto + SMTP_PORT
And the default SMTP_PORT is 25 while we use 587 => mail notifications
broke
2024-02-21 11:23:29 +01:00
Sam A. d05a504e61
Move vars around 2024-02-18 17:27:52 +01:00
Sam A. a99b39824c
Merge branch 'main' into add_uptime_data_coop 2024-02-18 17:23:43 +01:00
Sam A. 7aae344da0
Don't specify service settings twice 2024-02-18 17:18:54 +01:00
Víðir Valberg Guðmundsson 26b98681fc Bump mastodon to 4.2.7. 2024-02-16 15:35:12 +01:00
Víðir Valberg Guðmundsson 542268ffc6 Bump mastodon to 4.2.6. 2024-02-14 20:43:05 +01:00
Víðir Valberg Guðmundsson 54a63ca069 Add uptime kuma as a service we can deploy to a different host for monitoring. 2024-02-11 14:50:21 +01:00
Sam A. 46ffcd792c
Add missing bind mount and upgrade WriteFreely, close #192 2024-02-09 22:00:02 +01:00
Víðir Valberg Guðmundsson 068d3bd444 Bump mastodon to 4.2.5. 2024-02-01 18:55:42 +01:00
Sam A. 39fffe71ae
Upgrade Nextcloud to version 28 2024-01-13 15:04:02 +01:00
Sam A. 0fdfd2e76f
Exclude Mastodon cache from backup 2024-01-10 18:03:39 +01:00
Sam A. 9164b39906
Fix Postfix DNS name not found 2023-12-12 22:00:55 +01:00
Sam A. 88c4d99fc0
Upgrade Matrix (Synapse) to v1.98.0 2023-12-12 21:30:47 +01:00
Sam A. 7ef64bd132
Upgrade Element, close #184 2023-12-12 21:16:46 +01:00
Sam A. a3b5f5520d
Correct folder name for webmail overrides 2023-12-10 22:04:09 +01:00
Sam A. dfcca8a3e9
Fix Mailu admin container DNS conflict with OpenLDAP admin 2023-12-10 22:01:04 +01:00
Sam A. f627d1cf32
Upgrade Mailu, close #167 2023-12-10 18:04:50 +01:00
Sam A. c7289b4c5a Merge pull request 'Refactor service deployment + upload Compose files to the server' (#178) from compose-files into main
Reviewed-on: data.coop/ansible#178
2023-12-09 18:38:11 +00:00
Sam A. bd074929ac
Fix stuff 2023-12-09 19:37:46 +01:00
Sam A. e426c3d6c5
Rename Write Freely compose file 2023-12-07 20:47:11 +01:00
Sam A. 3b8c526da1
Merge branch 'main' into compose-files 2023-12-07 20:39:04 +01:00
Víðir Valberg Guðmundsson 27321a16a2 Fix writefreely mariadb datadir and set user_invites to admin. 2023-12-03 23:49:06 +01:00
valberg 0166d2434d Merge pull request 'Add writefreely instance.' (#179) from writefreely into main
Reviewed-on: data.coop/ansible#179
2023-12-03 22:31:39 +00:00
Víðir Valberg Guðmundsson 6e4b3e4aa4 Add writefreely instance. 2023-12-03 23:24:33 +01:00
Víðir Valberg Guðmundsson 04d4e38751 Remove some more byro stuff. 2023-12-03 22:20:19 +01:00
Sam A. 4082c6fde3
Add from_vagrant to deploy.sh 2023-11-04 01:20:53 +01:00
Sam A. 85e1da3cbf
Last fixes + install Compose v2 plugin 2023-10-04 22:05:59 +02:00
Sam A. 15fa5d6215
No need for Python Docker bindings since we use Docker cmd 2023-10-04 22:02:11 +02:00
Sam A. 2966e6715b
Add shell to users 2023-10-04 21:44:37 +02:00
Sam A. 5ae78bcd17
Fix magic 2023-10-04 21:34:59 +02:00
Sam A. 3dc4e14c15
Bump Vagrant specs 2023-10-04 19:59:09 +02:00
Sam A. af6a130695
Fix handler and name 2023-10-04 19:58:54 +02:00
Sam A. 98fcc2d634
Include service name in task names in block.yml 2023-10-04 19:44:39 +02:00
Sam A. 3ac2d83971
Magic 2023-10-04 19:43:11 +02:00
Sam A. 3001317e20
Ansible doesn't support looping over a block 2023-10-04 19:35:52 +02:00
Sam A. 301d1b7719
Add missing volume_folder vars 2023-10-04 19:35:09 +02:00
Sam A. f8b4e49f7f
Don't base 'vagrant' on virtualization (prep for Proxmox) 2023-10-04 18:43:33 +02:00
Sam A. d0b23d4ef5
Specify cpus in Vagrantfile 2023-10-04 18:37:57 +02:00
Sam A. 6cb06d43f1
Formatting 2023-10-03 22:13:30 +02:00
Sam A. 62f548d05b
Fix task for single service 2023-10-03 22:00:51 +02:00
Sam A. f067a1b6c2
Convert websites to Compose stacks 2023-10-03 21:45:21 +02:00
Sam A. 52b1d1ccd2
Use a block to deploy all services + add pre_deploy and post_deploy 2023-10-03 21:19:51 +02:00
Sam A. f50831460c
Convert all services to Compose stacks 2023-09-30 18:46:17 +02:00
Sam A. 728455f42a
Convert Netdata to a Compose stack, close #80 2023-09-30 17:19:10 +02:00
Sam A. 85aa718480
Split Matrix and Element into their own Compose stacks 2023-09-30 16:42:16 +02:00
Sam A. a47440b6b5
Move compose files into templates and upload them to the host 2023-09-30 16:25:06 +02:00
Sam A. 3098e1e320 Merge pull request 'Move static files into files/ and Jinja2 templates into templates/' (#169) from move_stuff_around into main
Reviewed-on: data.coop/ansible#169
2023-09-29 21:09:07 +00:00
Sam A. 656fb6baab
Merge branch 'main' into move_stuff_around 2023-09-29 23:02:07 +02:00
Sam A. 28992b66af
Remove remaining Byro files 2023-09-29 22:56:48 +02:00
Sam A. 136b675ccd
Upgrade Mastodon to 4.2.0, close #176 2023-09-29 21:54:21 +02:00
Sam A. ddb9629dea
Fix spacing and indentation 2023-09-29 21:09:23 +02:00
Víðir Valberg Guðmundsson 1449185591 Remove byro. 2023-09-25 09:48:29 +02:00
Víðir Valberg Guðmundsson 191ba1e011 Bump mastodon to 4.1.9. 2023-09-25 09:48:29 +02:00
Sam A. 2629c7c2f9
Replace another deprecated option for Forgejo 2023-09-23 16:43:31 +02:00
Sam A. 927d1e31ee
Replace deprecated option for Forgejo 2023-09-23 16:38:45 +02:00
Sam A. d662ae321e
Remove CodiMD, close #122 2023-09-16 18:22:48 +02:00
Sam A. 0272b93527
Upgrade Keycloak 2023-09-16 18:01:11 +02:00
Sam A. a372c1a980
Upgrade a bunch of stuff 2023-09-16 17:41:05 +02:00
Víðir Valberg Guðmundsson c50bccfada Upgrade portainer from 2.16.2 to 2.19.0 2023-09-16 14:27:44 +02:00
Sam A. 4e6f18311d
Use subfolders for templates as well 2023-08-05 19:35:55 +02:00
Sam A. a741a0c26c
Switch to Forgejo, close #145 2023-07-26 18:06:40 +02:00
Sam A. bb145efff2
Pull images on website 2023-07-26 17:15:35 +02:00
Sam A. 2a74df91f1 MERGE IT
Reviewed-on: data.coop/ansible#172
2023-07-26 15:05:11 +00:00
Sam A. 085bb1dfe7
Avoid code duplication 2023-07-26 17:03:33 +02:00
Benjamin Bach 4d09c1ec11
Update ansible task for data.coop website with new branches and docker images 2023-07-25 22:17:35 +02:00
Sam A. f9946e72ca
Merge branch 'main' into move_stuff_around 2023-07-20 18:09:41 +02:00
Sam A. 9126fd8d61
Quote number-like version numbers 2023-07-19 19:38:31 +02:00
Sam A. fc74fa0a3b
Upgrade Gitea to 1.20, close #165 2023-07-19 19:35:28 +02:00
Sam A. 1ebaef9f59
Fix cron job... 2023-07-11 22:52:59 +02:00
Sam A. e2a6d19a32
Fix folder permissions for Mastodon 2023-07-11 22:26:08 +02:00
Sam A. ec73fb702c
Fix cron job name 2023-07-11 22:02:21 +02:00
Sam A. 7d8b96cef0
Add cron jobs to clean cached Mastodon data, close #170 2023-07-11 21:56:04 +02:00
Sam A. 9920676155
Fix sender domains for Postfix 2023-07-11 21:44:05 +02:00
Víðir Valberg Guðmundsson 8c24a02a43 Enable email in matrix. 2023-07-11 21:30:22 +02:00
Sam A. 7d13fc5302
Use service names instead of subdomains for vhost file names 2023-07-09 23:07:23 +02:00
Sam A. ef7c00b748
Fix quote 2023-07-09 20:39:07 +02:00
Sam A. 863b285b07
Move files to their correct directories (files in files, Jinja2 templates in templates) 2023-07-09 20:27:32 +02:00
Sam A. c5857d0ba8
Don't put unnecessary executables in git 2023-07-09 19:51:26 +02:00
Sam A. f5ffd21dd3
Upgrade Nextcloud to version 27, close #164 2023-07-09 19:42:33 +02:00
Sam A. de67592d6e
Upgrade Synapse to v1.87.0, close #166 2023-07-09 19:24:01 +02:00
Víðir Valberg Guðmundsson bc4868cd8e Add byro.data.coop - a possible replacement for our own membersystem. 2023-07-09 11:49:21 +02:00
Víðir Valberg Guðmundsson 1a3ba48c07 Upgrade mastodon to 4.1.4. Close #154 2023-07-09 11:31:39 +02:00
Sam A. 96f65c02da
Add cron job to prune unused Docker data (close #168) 2023-07-07 18:15:01 +02:00
Víðir Valberg Guðmundsson 604c67e28f Point mailu definition to ghcr.io to get images. 2023-07-06 22:15:08 +02:00
Víðir Valberg Guðmundsson 30b52c2747 Upgrade mastodon to 4.0.5. 2023-07-06 22:14:29 +02:00
Víðir Valberg Guðmundsson b2b949ee98 Add www.ulovlig-logning.dk as a valid address for the ulovlig logning website. 2023-04-26 14:04:08 +02:00
Sam A. d8d0d32838
Upgrade Matrix (Synapse) to v1.81.0 2023-04-16 14:26:17 +02:00
Sam A. d2681c27a0
Rename Riot to Element globally 2023-04-08 00:45:30 +02:00
Sam A. f1df97ca04
Upgrade Element 2023-04-08 00:31:38 +02:00
Sam A. 493062b00a
Upgrade Matrix (Synapse) to v1.80.0 2023-04-08 00:15:05 +02:00
Sam A. 863cd56001
Upgrade HedgeDoc and Postfix 2023-04-06 19:10:47 +02:00
Sam A. f7afe5ba00
Fix spacing 2023-03-29 18:27:24 +02:00
Sam A. f9049451e9
Raise message rate limit for Mailu 2023-03-29 18:11:10 +02:00
Sam A. b5d980510d
FIDO bug in Passit should be fixed now 2023-03-26 18:35:30 +02:00
Sam A. b042d555b6
Edit README.md to describe users option 2023-03-14 16:17:02 +01:00
Sam A. 98d57e4cfa
Add SSH key for samsapti 2023-03-14 16:14:53 +01:00
Sam A. b1f1db5b30
Simplify Docker service names for Restic
This simplifies containernames such as "restic_backup_restic-backup_1"
to "restic_backup_1".
2023-03-09 17:50:13 +01:00
Sam A. 9cc70decab
Upgrade Restic 2023-03-09 17:43:25 +01:00
Sam A. 04799e4a8f
Fix mode for Restic SSH directory 2023-03-07 21:54:02 +01:00
reynir 2ca0b8daba Merge pull request 'Fix email setup' (#160) from reynir/ansible:fix-gitea into main
Reviewed-on: data.coop/ansible#160
2023-03-07 15:03:47 +00:00
Reynir Björnsson 77e4d90589 Fix email setup
Since whenever gomail doesn't like credentials when they're not going to
be used:

    Failed to send a testing email to 'reynir@reynir.dk': gomail: could not send email 1: SMTP server does not support AUTH, but credentials provided
2023-03-07 15:40:58 +01:00
Sam A. 9a255c692c
Merge pull request 'ansible.cfg use persistent connections' (#159) from reynir/ansible:persistent-connections into main
Reviewed-on: data.coop/ansible#159
2023-03-07 14:39:03 +01:00
Reynir Björnsson 3bddaaa22c ansible.cfg use persistent connections
This makes ansible try to use one ssh connection for everything. This
greatly reduces the number of TCP connections and authentication
attempts.
2023-03-07 13:14:47 +01:00
Sam A. 5cae83c557 Merge pull request 'Remove Pinafore' (#148) from removal/pinafore into main
Reviewed-on: data.coop/ansible#148
2023-03-07 11:16:32 +00:00
Sam A. e9410c4f8f
Use domain name instead of IP in inventory file 2023-03-06 22:27:53 +01:00
Reynir Björnsson ef5ef78ccb Merge remote-tracking branch 'data.coop/vhs.data.coop' 2023-03-06 20:43:12 +01:00
Sam A. 9d4c7be801
Add known_hosts to Restic's SSH folder 2023-03-06 13:38:52 +01:00
Reynir Björnsson 32f25aeb8f Add vhs.data.coop website 2023-03-06 11:50:59 +01:00
Sam A. 2d11a664b4
Fix Vagrant logic 2023-03-05 23:10:53 +01:00
Sam A. 9a4912f9b5 User Fedder's TrueNAS for Restic backups (#153)
Thanks Fedder!

Co-authored-by: Sam Al-Sapti <sam@sapti.me>
Reviewed-on: data.coop/ansible#153
2023-03-05 22:01:53 +00:00
Sam A. 2d85dec774 Merge pull request 'Add fedi.dk website' (#155) from reynir/ansible:add-fedi.dk-website into main
Reviewed-on: data.coop/ansible#155
2023-02-20 18:22:07 +00:00
Reynir Björnsson 82aa6f67aa Add fedi.dk website 2023-02-18 21:09:49 +01:00
Sam A. 31b2bcd35e
Rallly follows SemVer, so pinning to major version 2023-02-11 21:08:16 +01:00
Sam A. b7307c3e8e
Upgrade Rallly, it uses version numbers now 2023-02-11 20:34:07 +01:00
Sam A. b3c2f36a9d
Upgrade Watchtower 2023-02-11 20:31:16 +01:00
Sam A. be450fc8b8
Merge branch 'main' into removal/pinafore 2023-01-22 19:28:08 +01:00
Sam A. 593dddd00e
Upgrade Passit database and temporarily pin Passit due to WebAuthn bug 2023-01-22 02:00:53 +01:00
Sam A. 16aec98808
HedgeDoc image version :1 doesn't exist, but Alpine doesn't have vulnerabilities 2023-01-21 21:49:27 +01:00
Sam A. a5d59b9336
Fix variable 2023-01-21 21:37:37 +01:00
Sam A. 388e0526ca
Set RUN_ON_STARTUP=false for Restic 2023-01-21 21:33:39 +01:00
valberg b445d7db17 Merge pull request 'Enable Watchtower for all services' (#123) from watchtower into main
Reviewed-on: data.coop/ansible#123
2023-01-21 17:17:55 +00:00
Sam A. 7ca168ae03
Merge branch 'main' into watchtower 2023-01-21 17:33:45 +01:00
Sam A. 209ccf9916 Merge pull request 'Collect even more version numbers in docker/defaults/main.yml' (#143) from unify_more_configurations into main
Reviewed-on: data.coop/ansible#143
2023-01-21 16:30:07 +00:00
Sam A. f81fab3d11
Quote numbers 2023-01-14 17:31:08 +01:00
Sam A. 9733794292
Revert "Make quotations consistent"
This reverts commit 231af48a40.
2023-01-14 17:24:53 +01:00
Sam A. 2f1c1887ba
Revert "Make quotations consistent"
This reverts commit a10b07fa2c.
2023-01-14 17:21:34 +01:00
Sam A. 34f95f31e4
Remove Pinafore 2023-01-14 17:14:31 +01:00
Sam A. a246dbf497
Merge branch 'main' into unify_more_configurations 2023-01-07 18:21:25 +01:00
Sam A. 58f3df7ed0
Merge branch 'main' into watchtower 2023-01-06 14:53:59 +01:00
Sam A. 1bbf1edf57
Upgrade Rallly 2023-01-06 14:49:23 +01:00
Sam A. 035c683f67 Merge pull request 'Bump matrix client_max_body_size to 1GB' (#140) from matrix-client-max-body-size into main
Reviewed-on: data.coop/ansible#140
2023-01-06 13:22:58 +00:00
Sam A. 99e2d04829
Set up DKIM for Postfix 2023-01-05 17:02:44 +01:00
Víðir Valberg Guðmundsson 5b2f460cad Bump gitea til 1.18.0. 2023-01-02 22:19:39 +01:00
Sam A. 5bcba6fa59 QoL changes for *Vim users (#144)
Co-authored-by: Sam Al-Sapti <sam@sapti.me>
Reviewed-on: data.coop/ansible#144
2022-12-29 21:13:31 +00:00
Sam A. f02440048c
Add a way to only deploy users 2022-12-29 17:55:59 +01:00
Sam A. b6f30af8ba
Edit SSH key for samsapti 2022-12-29 17:52:12 +01:00
Víðir Valberg Guðmundsson a7776ab30a Add a new ssh key for valberg. 2022-12-28 20:58:59 +01:00
Sam A. a10b07fa2c
Make quotations consistent 2022-12-28 16:46:52 +01:00
Sam A. 231af48a40
Make quotations consistent 2022-12-28 16:23:23 +01:00
Sam A. d6ce46e2f2
Collect even more version numbers in docker/defaults/main.yml 2022-12-28 16:19:07 +01:00
Sam A. ad9a42f223
Add Nextcloud to allowed sender domains 2022-12-27 21:50:12 +01:00
Sam A. 44eb59fb86
Merge branch 'main' into watchtower 2022-12-27 19:48:32 +01:00
Sam A. 2485c25dc1
Add mailqueue directory to Mailu 2022-12-27 18:32:27 +01:00
Sam A. 35d0844bd7
Upgrade Mailu to 1.9 2022-12-27 18:20:30 +01:00
Sam A. a3d5c70c06
Upgrade Gitea to 1.7.4 2022-12-26 18:19:34 +01:00
Sam A. 7d889b4f02
Upgrade Postfix to v3.5.1 and use Alpine-based image
Alpine is already the default, but it's better to explicitly specify it.
2022-12-26 17:52:09 +01:00
Sam A. 9c559e3322
Revert task name 2022-12-22 19:13:29 +01:00
Sam A. a1ac25b56d
Don't install python bindings for docker-compose twice 2022-12-22 18:25:03 +01:00
Sam A. f1737bb9c8
Allow sso.data.coop to send emails 2022-12-20 22:46:40 +01:00
Reynir Björnsson 7851fe3522 Bump max upload size 2022-12-17 21:43:18 +01:00
Reynir Björnsson 3fb8ecb72f Bump matrix client_max_body_size to 1GB 2022-12-17 21:27:01 +01:00
Sam A. 8fc0a97d23
Remove new-new.data.coop from Ansible 2022-12-14 18:46:03 +01:00
Sam A. 64ec448fc0
Remove new-new.data.coop container 2022-12-14 18:43:49 +01:00
Sam A. b1c9113cb7
Fix git URL 2022-12-13 16:32:33 +01:00
Sam A. 76df6320a4
Upgrade Pinafore to v2.5.0 2022-12-13 16:30:43 +01:00
reynir 99f9615ef2 Use http git.data.coop endpoints for websites (#139)
Gitea is notoriously strict with its http smart git implementation. This required a few fixes in upstream ocaml-git. They are now released, and we don't have to use github or ssh-keys.

Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: data.coop/ansible#139
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-12-13 15:24:32 +00:00
Sam A. 3b8c475bb1
Fix vhost-www 2022-12-07 22:04:31 +01:00
Sam A. 019b646caa
Rename 2022_slides_website due to error 2022-12-07 21:57:36 +01:00
Sam A. cf756ee881
Fix file source 2022-12-07 21:51:51 +01:00
Sam A. 000216d74d
Add vhost config for www.data.coop and move vhost-root copying task to data.coop.yml 2022-12-07 21:49:36 +01:00
Sam A. cd03e98f10
Add missing services to defaults/main.yml 2022-12-07 21:37:54 +01:00
Sam A. cff82acd9f
Don't set base_domain in Vagrantfile
It's already set in playbook.yml according to the vagrant variable.
2022-12-06 19:41:07 +01:00
Sam A. bbd6b6f8da
Upgrade Rallly 2022-12-06 18:18:41 +01:00
Sam A. 2c9c501562
Remove label from Pinafore 2022-12-06 18:06:31 +01:00
Sam A. 0dcc0a6d75
Merge branch 'main' into watchtower 2022-12-06 18:05:15 +01:00
reynir 51c8acc119 Add pinafore (#135)
I don't find any official docker images, so I set up a fork of the repo and build it with drone:

https://git.data.coop/data.coop/pinafore

Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: data.coop/ansible#135
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-12-05 15:37:18 +00:00
Víðir Valberg Guðmundsson 73bf2d41ba Restart all mastodon containers instead of recreating them. 2022-12-04 22:55:00 +01:00
Sam A. c4f3911400 Always recreate Mastodon containers (#134)
Fixes #133.

Co-authored-by: Sam Al-Sapti <sam@sapti.me>
Reviewed-on: data.coop/ansible#134
Co-authored-by: Sam A. <samsapti@noreply@git.data.coop>
Co-committed-by: Sam A. <samsapti@noreply@git.data.coop>
2022-12-04 21:45:32 +00:00
Víðir Valberg Guðmundsson 759ea93dd3 Mastodon: Split sidekiq queues into different containers. Tune postgresql. Set threads and concurrency on web and streaming. 2022-12-02 23:35:36 +01:00
benjaoming 97e5f264f9 Merge pull request 'Add README.md' (#127) from readme into main
Reviewed-on: data.coop/ansible#127
2022-11-29 13:58:39 +00:00
Sam A. 6cd0eadade
Apply valberg's suggestions 2022-11-28 19:31:31 +01:00
Sam A. 09215e117a
Add 'Contributing' section 2022-11-28 19:24:49 +01:00
Sam A. 789caed704
Change wording 2022-11-28 18:56:09 +01:00
Sam A. 6a29cdc84d
Apply benjaoming's suggestions 2022-11-28 18:20:12 +01:00
reynir bd9c134e07 deploy.sh: print usage message (#130)
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-11-28 14:27:49 +00:00
Sam A. 3f036ac0ea
Revert "Update README.md"
This reverts commit bef767ebd8.
2022-11-27 21:00:47 +01:00
Sam A. bef767ebd8
Update README.md 2022-11-27 17:35:40 +01:00
Sam A. 3b7732031c
Merge branch 'main' into readme 2022-11-27 17:33:37 +01:00
Sam A. 93b1ed60ae
Update README.md 2022-11-27 17:20:40 +01:00
Sam A. 59dae865c5
Add missing file to codimd 2022-11-27 16:34:20 +01:00
reynir e45eb02208 Don't hardcode domains (#129)
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: data.coop/ansible#129
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-11-27 14:01:55 +00:00
Sam A. a1e8203d55
Don't hardcode domains 2022-11-26 23:15:09 +01:00
Sam A. ab1f170790
Opt out of Mailu statistics, and don't hardcode domains 2022-11-26 23:01:12 +01:00
Sam A. c8d603b6aa
Add J2Live to README.md 2022-11-26 22:50:32 +01:00
Sam A. f3fd5c7c74
Shorten Jinja2 filter in postfix.yml 2022-11-26 22:48:15 +01:00
Sam A. e983499f9b
Use value_name='service' in setup services task 2022-11-26 22:13:51 +01:00
Sam A. 7c7379c42c
Update README.md 2022-11-26 20:28:19 +01:00
Sam A. a89140ef51
Quality of Life lvl 100 2022-11-26 20:13:31 +01:00
Sam A. bb920407f3
Add depends_on conditions to Mastodon 2022-11-26 17:18:31 +01:00
Sam A. 1356aa54c8
Merge branch 'main' into watchtower 2022-11-26 16:49:53 +01:00
Sam A. 7962a75481
Remove thelounge.js 2022-11-26 16:38:32 +01:00
Sam A. 4611d890f7
Update README.md 2022-11-26 16:32:06 +01:00
Sam A. 5945d6847f
Merge branch 'main' into readme 2022-11-26 16:22:32 +01:00
Víðir Valberg Guðmundsson 8b1b3e1e3c Quality of life. 2022-11-26 09:15:55 +01:00
valberg d15e7e562f Collect versions and service information in docker/defaults/main.yml (#125) 2022-11-26 08:15:18 +00:00
Sam A. e328c558cf
Rename Rallly's env_file to env_file.j2 2022-11-25 23:57:35 +01:00
Sam A. 62d5a3ccca
Add README.md 2022-11-25 23:36:47 +01:00
Sam A. 44b5f91eef
Merge branch 'main' into watchtower 2022-11-25 22:12:47 +01:00
Sam A. fa603b07d9
Upgrade HedgeDoc to 1.9.6 2022-11-25 22:04:38 +01:00
Sam A. 67a8c3d1a2
Add missing services to playbook.yml 2022-11-25 22:04:14 +01:00
Sam A. 439a538c14
Lint 2022-11-25 21:41:37 +01:00
Sam A. 814a268965
Don't enable Restic Backup in Vagrant 2022-11-25 21:37:14 +01:00
Sam A. 5a63e8e1a8 Vagrant-based testing environment (#111)
Co-authored-by: Sam A. <samsapti@noreply@git.data.coop>
Co-committed-by: Sam A. <samsapti@noreply@git.data.coop>
2022-11-25 13:07:09 +00:00
Víðir Valberg Guðmundsson 124d8660db Moved membersystem image. 2022-11-25 00:16:10 +01:00
Sam A. 74dfcfb5e8
Keycloak: avoid very long lines :( 2022-11-23 21:09:05 +01:00
Sam A. 221ddd987f
Upgrade Postfix to 3.5.1 and use Alpine-based image 2022-11-23 21:05:01 +01:00
Sam A. 687bff35e9
Pin netdata to v1 2022-11-23 21:00:48 +01:00
Sam A. 9261cb1952
Pin Keycoak to 20.0 (minor version) 2022-11-23 20:34:43 +01:00
Sam A. 1f61909605
Pin HedgeDoc to major version 1
From https://docs.hedgedoc.org/setup/getting-started/#upgrading-hedgedoc

> HedgeDoc follows [Semantic Versioning](https://semver.org/).
> This means that minor and patch releases should not introduce
> user-facing backwards-incompatible changes.
2022-11-23 20:16:36 +01:00
Sam A. d9de1efc9a
Pin Gitea to 1.17 instead of 1.17.3
Gitea's "minor" version change seems to be the one that occasionally
introduces breaking changes, so let's not update that automatically.
Only keep the patch-releases automatically updated.
2022-11-23 20:02:30 +01:00
Sam A. 2fa5bf4982
Merge branch 'main' into watchtower 2022-11-23 19:51:58 +01:00
Víðir Valberg Guðmundsson 78b15ddcc4 Pin restic backup. 2022-11-22 23:13:01 +01:00
Víðir Valberg Guðmundsson d6766e601a Upgrade portainer to 2.16.2. 2022-11-22 22:52:23 +01:00
Víðir Valberg Guðmundsson cbc209c381 Set keycloak path to the old path. 2022-11-22 22:52:08 +01:00
Víðir Valberg Guðmundsson f040880c26 Pin rallly. 2022-11-22 22:47:22 +01:00
Víðir Valberg Guðmundsson 394e158c51 Make sure to always restart membersystem if it goes down. 2022-11-22 22:39:34 +01:00
Víðir Valberg Guðmundsson 14d97ee7a6 Upgrade keycloak to 20.0.1 2022-11-22 22:38:05 +01:00
Sam A. fc7ca37b07
Make TCP the default allowed firewall protocol
Custom protocol can still be specified by adding `proto: "proto"` to a
loop item.
2022-11-22 21:40:21 +01:00
Sam A. 71cc3e2241
Fix firewall ports format 2022-11-22 21:22:23 +01:00
Sam A. d53c6d41dc Merge pull request 'Firewall (UFW)' (#107) from samsapti/ansible:main into main
Reviewed-on: data.coop/ansible#107
2022-11-22 20:05:00 +00:00
Sam A. 9852a42470
Upgrade Element to 1.11.8 2022-11-22 18:59:34 +01:00
Sam A. efbdcc9a5a
Add missing postfix network to Nextcloud container 2022-11-22 17:45:13 +01:00
Sam A. e0c0163aae
Add cron container to Nextcloud 2022-11-22 17:40:55 +01:00
Sam A. fe4b3ede81
Add Redis memcache to Nextcloud 2022-11-22 17:15:59 +01:00
Sam A. 8180a736f7
Use Alpine-based nginx-proxy Docker image 2022-11-22 16:53:34 +01:00
reynir 728cffc453 Expose mastodon streaming api (#124)
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Reviewed-on: data.coop/ansible#124
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-11-22 13:38:46 +00:00
Víðir Valberg Guðmundsson 31a73f48fb Upgrade and pin nginx-proxy and acme-companion. 2022-11-22 14:37:31 +01:00
Víðir Valberg Guðmundsson d467084fb7 Bump mastodon sidekiq threads to 32. 2022-11-22 09:36:36 +01:00
Sam A. 20b977eacb
Upgrade Nextcloud to version 25 2022-11-21 23:42:20 +01:00
Sam A. e917636d05
Upgrade Nextcloud to 24 2022-11-21 23:37:07 +01:00
Sam A. 1ebfab5abf
Upgrade one major version at a time, 23 now 2022-11-21 23:31:22 +01:00
Sam A. 12effe5673
Upgrade Nextcloud to 25.x.x 2022-11-21 21:34:07 +01:00
Sam A. c9ab9f0c66
Watchtower doesn't need external_services network 2022-11-19 18:20:10 +01:00
Sam A. e5dcfea003
Pin Watchtower version 2022-11-19 18:19:43 +01:00
Sam A. 27b918b46b
Remove labels 2022-11-18 21:07:12 +01:00
Sam A. 5d26e1cdea
Fix mount point for Watchtower
The auth file created by the registry login task doesn't need to be
stored in a non-default path.
2022-11-18 20:58:22 +01:00
Sam A. a4a06d8a58
Upgrade Watchtower and disable filter by enable label 2022-11-18 18:59:00 +01:00
Víðir Valberg Guðmundsson 2c9dce8600 Upgrade gitea to 1.17.3. 2022-11-17 20:50:38 +01:00
Víðir Valberg Guðmundsson 4bc69b49bb Upgrade mastodon to 4.0.2 2022-11-17 20:40:59 +01:00
reynir bcbe0a8285 Set up vhost for both {riot,element}.data.coop (#121)
A fix for #115.

Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: data.coop/ansible#121
Co-authored-by: reynir <data.coop@reynir.dk>
Co-committed-by: reynir <data.coop@reynir.dk>
2022-11-16 19:13:45 +00:00
reynir a92d840ce0 Merge pull request 'Add root keys for all users' (#120) from fix-root-keys into main
Reviewed-on: data.coop/ansible#120
2022-11-16 15:24:44 +00:00
Reynir Björnsson 5a54eb6b1e Flatten the list 2022-11-16 16:24:22 +01:00
Reynir Björnsson c802777867 Add root keys for all users
And not just the last user.
2022-11-16 16:10:10 +01:00
Reynir Björnsson a03263b1f5 riot/element: expose port 8080
nginx-proxy uses this information to determine if the (in nginx
parlance) server is up.
2022-11-16 13:45:58 +01:00
Sam A. 52ead4fee5
Remove volume_root_folder from vars.yml
It is defined later in the docker role already.
2022-11-15 20:52:38 +01:00
Sam A. 58dbf9ff22
Allow only TCP traffic on specified ports 2022-11-15 20:42:18 +01:00
Sam A. ba44677cf3
Avoid conflicts with built-in function name keys 2022-11-15 20:28:34 +01:00
Sam A. fc0c0c5036
Always update password and overwrite keys 2022-11-15 19:57:17 +01:00
valberg 5b2e2c0f60 Merge pull request 'Lock account 'graffen'' (#102) from lock-graffen into main
Reviewed-on: data.coop/ansible#102
2022-11-13 12:28:38 +00:00
Sam A. 42e1900715
Delete unused secrets 2022-11-12 23:06:45 +01:00
Sam A. d597a956ff
Add installation of community modules to deploy.sh 2022-11-12 19:41:57 +01:00
Sam A. 5f718e1027
Add firewall setup with UFW 2022-11-12 19:41:55 +01:00
Reynir Björnsson 536441d24b Fix 2022.slides, and use git.data.coop repo
The ocaml-git fix has been released, and don't call the container
new-new.data.coop_website D:
2022-11-12 19:30:38 +01:00
Sam A. bf60417904
Fix FIDO2 authentication in Passit 2022-11-12 19:21:58 +01:00
Víðir Valberg Guðmundsson aecb929dbb Add a way to only run the base role. 2022-11-11 22:16:22 +01:00
valberg f905696264 Add admin user (#108)
Welcome aboard!
2022-11-11 18:05:10 +00:00
Sam A. d4f8fbcebe
Add Sam as admin user 2022-11-11 18:33:18 +01:00
Víðir Valberg Guðmundsson 0e7cc20bce Update portainer to use the ee version. 2022-11-10 21:15:42 +01:00
valberg 57f05d7d81 Merge pull request 'Security hardening: Don't expose unnecessary ports to the public' (#106) from samsapti/ansible:main into main
Reviewed-on: data.coop/ansible#106
2022-11-10 19:19:00 +00:00
Sam A. cc2fab6ad7
Ports and domain fixes 2022-11-10 19:32:39 +01:00
Víðir Valberg Guðmundsson a81862fd8b Small fixes for rallly. 2022-11-09 20:58:32 +01:00
Víðir Valberg Guðmundsson e85b119bfe Small fixes to get rallly working. 2022-11-09 20:41:41 +01:00
Víðir Valberg Guðmundsson dcb2e8be05 Upgrade mastodon to 3.5.3. 2022-11-09 20:29:31 +01:00
valberg f0ca964c5b Merge pull request 'Add Rallly' (#103) from samsapti/ansible:main into main
Reviewed-on: data.coop/ansible#103
2022-11-09 19:28:57 +00:00
Sam A. dc51b62872
Capitalization fix 2022-11-09 20:18:08 +01:00
Sam A. dd6b29bccd
Add secrets and env file for Rally 2022-11-09 20:18:07 +01:00
Sam A. f71d534afe
Add Rallly 2022-11-09 20:17:58 +01:00
Víðir Valberg Guðmundsson b043b95353 Point backup at decibytes server. 2022-11-08 20:45:03 +01:00
Reynir Björnsson 8f9196ce60 Lock account 'graffen'
:'(
2022-11-05 15:08:35 +01:00
Jesper Hess 74883a564d
Add handler to restart nginx container when adding nextcloud VHost config 2022-09-02 12:23:19 +02:00
Reynir Björnsson f0979ec654 nextcloud: Raise upload limit to 1GB 2022-08-31 20:10:42 +02:00
Víðir Valberg Guðmundsson 73adef15f9 Fixing watchtower and membersystem. 2022-08-09 19:47:40 +02:00
Víðir Valberg Guðmundsson 9f3a6c67ff Use latest tag for membersystem docker image. 2022-08-09 14:46:48 +02:00
Víðir Valberg Guðmundsson e68145bc5e Add membersystem to ansible. 2022-08-09 13:54:12 +02:00
Reynir Björnsson 326393aadb Add 2022 slides 2022-08-07 13:28:38 +02:00
Víðir Valberg Guðmundsson a6420830e4 Remove thelounge. 2022-07-23 15:48:49 +02:00
Víðir Valberg Guðmundsson e806ffc3ad Remove fider and tt-rss. 2022-07-23 15:46:30 +02:00
Víðir Valberg Guðmundsson 7b60ae1c28 Switch from ouroboros to watchtower. Close #82. 2022-07-23 15:42:51 +02:00
Víðir Valberg Guðmundsson 371237b9f8 Include mastodon in services list. Set letsencrypt_email to admin@data.coop. 2022-07-23 15:13:14 +02:00
reynir 09b05bf657 Add new-new.data.coop using unipi! (#99)
This exposes the contents of the git repository at https://git.data.coop/halfd/new-website using the MirageOS unikernel [unipi](https://github.com/roburio/unipi).

Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: data.coop/ansible#99
2022-07-23 12:46:26 +00:00
Reynir Björnsson 442bb4ad58 Add apt preferences file for dell repo
Deny all packages from dell repo that exist elsewhere

Fixes #95
2022-07-22 20:41:34 +02:00
Jesper Hess a8287a712b Add restart policy to OpenLDAP containers 2022-07-22 18:02:41 +00:00
Jesper Hess ed9c742aed Bump Synapse version -> 1.63.1 and Element -> 1.11.0 2022-07-22 18:02:06 +00:00
Jesper Hess b07cf84dd3
Matrix: Workaround for incorrect db locale
Related to: #92
2022-07-22 15:14:01 +02:00
Jesper Hess 997779d627 Add Dell apt signing key 2022-07-22 12:37:39 +00:00
Jesper Hess c6a3cb5150 move tags into main.yml instead 2022-07-22 12:37:39 +00:00
Jesper Hess 964a6c0793 Add some more useful ansible tags
- do-full-system-upgrade
- setup-users
- install-base-packages
2022-07-22 12:37:39 +00:00
Jesper Hess 70dff33044 Install Dell OpenManage 2022-07-22 12:37:39 +00:00
Jesper Hess 57f6e9ad4f Add Dell OpenManage APT repo 2022-07-22 12:37:39 +00:00
Jesper Hess 515861c206 Fix config for default matrix server in element
Fixes: #88
2022-07-22 12:36:53 +00:00
Sam A. 2e3cd4c8b0
Update Docker image for nginx-proxy LE companion 2022-06-23 22:14:30 +02:00
Víðir Valberg Guðmundsson 1417c9dbf6 Upgrade gitea from 1.15.7 to 1.16.8. 2022-05-24 19:45:49 +02:00
valberg 40afe51998 Merge pull request 'gitea: require email confirmation on registration' (#74) from gitea-require-email-confirmation into master
Reviewed-on: data.coop/ansible#74
2022-05-08 19:19:13 +00:00
Víðir Valberg Guðmundsson 29971520d5 Rename smtp hostname to smtp.data.coop. 2022-05-08 13:58:21 +02:00
Víðir Valberg Guðmundsson e74753cab4 Mastodon! 2022-05-07 22:53:18 +02:00
Reynir Björnsson 0aeb0fef96 gitea: require email confirmation on registration 2022-04-07 14:35:21 +01:00
Reynir Björnsson c0ec5c3853 Update host ip 2022-03-02 15:44:40 +00:00
Reynir Björnsson 3791e1351a Install mosh 2022-01-31 10:57:24 +00:00
Reynir Björnsson 25eab11d12 Add another key for reynir 2022-01-28 13:15:17 +00:00
Reynir Björnsson 5d745e0cde Allow for multiple ssh keys
This required restructuring users.yml.
2022-01-28 13:15:14 +00:00
Reynir Björnsson 54a38114d6 gitea: Enable notify emails 2022-01-28 13:13:12 +00:00
benjaoming 17d4513b97 Add security and password policy customization
I need someone with a functional Docker setup to help test this :)

Tip from a new user that we are requiring stupid password stuff

https://www.bbc.com/news/technology-40875534
2022-01-24 09:53:59 +00:00
Reynir Björnsson 36534604c1 Add dummy user and pass
It seems perhaps it is required by gitea before it will enable email
2022-01-24 09:39:03 +00:00
Reynir Björnsson d73cc9e28f Gitea mail typo: smpt_port -> smtp_host 2022-01-24 09:25:44 +00:00
Reynir Björnsson 554024f2b2 Gitea mail: add crucial configuration 2022-01-24 09:19:54 +00:00
Reynir Björnsson ac455beac0 Add quotes
Non-string value found for env option. Ambiguous env options must be wrapped in quotes to avoid them being interpreted. Key: GITEA__mailer__ENABLED
2022-01-24 09:07:49 +00:00
valberg 1680ab0fc9 gitea-enhancements (#70) 2022-01-23 19:01:32 +00:00
valberg 499bd20ad1 Merge pull request 'Refactor allowed_sender_domains and allow more domains' (#69) from reynir/ansible:postfix-allowed_sender_domains into master
Reviewed-on: data.coop/ansible#69
2022-01-23 16:38:30 +00:00
Reynir Björnsson e3156c7c01 Gitea: setup mailer, raise LOGIN_REMEMBER_DAYS 2022-01-20 13:48:04 +00:00
Reynir Björnsson 6e57f1d0c2 Refactor allowed_sender_domains and allow more
A new object 'postfix' is created with a list of allowed_sender_domains.
Any services that expect to send mail this way should add its sender
domain to that list.
2022-01-20 13:36:48 +00:00
Jesper Hess 04b3fb4baa
Upgrade gitea -> v1.15.7 2021-12-14 16:24:02 +01:00
Jesper Hess c2f1f10e0d Merge pull request 'Define referenced variable nextcloud.volume_folder' (#67) from nextcloud-fixup into master
Reviewed-on: data.coop/ansible#67
2021-11-23 14:31:55 +00:00
Reynir Björnsson 9e0fcfc4a7 Define referenced variable nextcloud.volume_folder 2021-11-23 13:49:50 +01:00
Reynir Björnsson 68c82a785b Upgrade synapse to v1.47.1 2021-11-23 13:12:15 +01:00
Jesper Hess 682e205c0b Bump OpenLDAP to 1.5.0 and phpLDAPAdmin to 0.9.0 2021-10-11 18:53:22 +02:00
Jesper Hess e64c858df8 Bump portainer version to 2.9.1 2021-10-11 18:52:39 +02:00
Jesper Hess c0bd431d3c Change default sender domain to @services.data.coop so as not to cause issues with our @data.coop emails 2021-10-10 18:03:09 +02:00
Jesper Hess a5a2d38b0c Bump Synapse to v1.44.0 and Element to v1.9.0 2021-10-10 15:25:54 +02:00
Jesper Hess c34d9fcb90 Add Hedgedoc
- Add Hedgedoc as a replacement for CodiMD.
- Integrate it with the new SSO system
2021-10-09 22:42:35 +02:00
Jesper Hess 5294b5f230 Merge pull request 'Add keycloak service' (#66) from keycloak into master
Reviewed-on: data.coop/ansible#66
2021-10-09 12:20:18 +00:00
Jesper Hess 270b7aa0e1 Merge branch 'master' into keycloak 2021-10-09 12:19:45 +00:00
Jesper Hess b6c2db6434
Switch NextCloud to docker_compose in Ansible + upgrade to v22 2021-10-09 14:13:18 +02:00
Jesper Hess 2af5165349
Upgrade portainer to 2.9.0 2021-10-07 20:59:38 +02:00
Jesper Hess ca6c3a96a1
Comment out the KEYCLOAK_USER and KEYCLOAK_PASSWORD since they mess up things after first run 2021-10-07 20:58:31 +02:00
Jesper Hess e6ee76ddde Merge branch 'master' into keycloak 2021-10-07 11:31:07 +00:00
Jesper Hess 19e7a397e3 Merge pull request 'Bump element to v1.8.4' (#65) from element.v1.8.4 into master
Reviewed-on: data.coop/ansible#65
2021-10-07 11:26:56 +00:00
Jesper Hess 2c8482a5ab Merge branch 'master' into element.v1.8.4 2021-10-07 11:26:42 +00:00
Jesper Hess 3999db2eff
Add keycloak service 2021-10-07 13:20:30 +02:00
Reynir Björnsson 43f39c981d Bump element to v1.8.4
See https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing
2021-09-14 15:30:08 +02:00
Jesper Hess b39df6003b
Disable Matrix registrations and move Matrix secrets to Ansible vault.
Fixes #46
2021-07-03 09:12:18 +02:00
Jesper Hess 0ef4f972ed
Update Element -> 1.7.29 & Synapse -> 1.34.0 2021-05-28 06:23:46 +02:00
Jesper Hess 9b1dc31163 Merge pull request 'Use inventory in ansible.cfg' (#60) from hosts into master
Reviewed-on: data.coop/ansible#60
2021-03-05 07:49:59 +00:00
Reynir Björnsson 62cc00bea7 Use inventory in ansible.cfg 2021-03-04 13:52:25 +01:00
Víðir Valberg Guðmundsson 30b9580d3c Add required pip packages. 2021-02-01 21:06:39 +01:00
Víðir Valberg Guðmundsson 9e5c18f839 Rename docker_service tasks to docker_compose. 2021-02-01 21:06:23 +01:00
Víðir Valberg Guðmundsson 068502773e Fix matrix_riot service. 2021-02-01 20:51:28 +01:00
valberg fbebeef57b Merge pull request 'Migrate Passit to docker_service & set correct volume folder path' (#54) from passit-cleanup into master
Reviewed-on: data.coop/ansible#54
2021-01-31 10:30:23 +00:00
Jesper Hess a692e7d2cb
Migrate Passit to docker_service & set correct volume folder path 2021-01-28 14:01:19 +01:00
Jesper Hess 406e19a95c
Document new secrets needed in secrets.yml 2021-01-27 13:17:48 +01:00
Víðir Valberg Guðmundsson cec959a47e Upgrade portainer to 2.0.1. 2021-01-26 21:59:26 +01:00
valberg c8cc5b7534 Merge pull request 'Backup of /docker-volumes folder' (#53) from restic_backup into master
Reviewed-on: data.coop/ansible#53
2021-01-26 19:45:13 +00:00
Jesper Hess 9ae295896f
Use docker_service ansible command 2021-01-26 20:40:22 +01:00
Jesper Hess 6d2fbdbbb6
Fix secret for restic repo 2021-01-26 20:19:34 +01:00
Jesper Hess 3fe7d162aa
Use correct volume folder 2021-01-26 20:01:05 +01:00
Jesper Hess 86de1fd24e
Initial work on restic container for backup 2021-01-26 19:57:06 +01:00
Víðir Valberg Guðmundsson a4966e74fe Remove deni key. 2021-01-19 23:08:56 +01:00
valberg cf6fe970eb Merge pull request 'Change YAML to use lists instead of comma-separated strings for domains because it looks nicer' (#51) from domain_lists into master
Reviewed-on: data.coop/ansible#51
2020-12-17 08:20:50 +00:00
Jesper Hess f5293c016d
Change YAML to use lists instead of comma-separated strings for domains because it looks nicer 2020-12-17 08:43:24 +01:00
reynir e9f1d800a1 Merge pull request 'Update cryptoaarhus.dk domains' (#49) from cryptoaarhus.dk into master
Reviewed-on: data.coop/ansible#49
2020-12-11 08:57:32 +00:00
Reynir Björnsson fe5fa81f44 Update cryptoaarhus.dk domains 2020-12-10 16:25:26 +01:00
Jesper Hess bb5c77e602
Fix typo 2020-11-27 10:48:02 +01:00
Jesper Hess 21e2b743ef Merge pull request 'Bump Matrix max upload size to a whopping 50 MB' (#45) from matrix-max-upload-size into master
Reviewed-on: data.coop/ansible#45

All good, thanks!
2020-11-27 09:37:58 +00:00
Reynir Björnsson 8d88016efd Matrix: up nginx client_max_body_size to 50MB
Then it's consistent with max_upload_size (sort of - modulo overhead in
http)
2020-11-27 10:36:51 +01:00
Jesper Hess 2ac2d8b8da
Change ouroboros interval to 10min to hopefully fly under the new docker hub rate limit. 2020-11-23 08:25:35 +01:00
Reynir Björnsson a78641674d cryptoaarhus_website: Add cryptoaarhus.dk domain 2020-11-05 08:47:58 +01:00
Reynir Björnsson 03cde007bc Bump Matrix max upload size to a whopping 50 MB 2020-10-19 10:01:00 +02:00
reynir d40b3ad9ab Merge pull request 'Add cryptoaarhus website' (#36) from reynir/ansible:cryptoaarhus.dk into master
Reviewed-on: data.coop/ansible#36
2020-09-28 13:54:15 +00:00
reynir 5738a8c40f Merge branch 'master' into cryptoaarhus.dk 2020-09-28 12:29:11 +00:00
Jesper Hess 5559a2c776 Merge pull request 'Allow fetching data.coop's public rooms over federation' (#44) from carl/ansible:synapse-room-list into master
Reviewed-on: data.coop/ansible#44
2020-09-23 19:31:15 +00:00
Carl Bordum Hansen 653a0603d5 Allow fetching data.coop's public rooms over federation 2020-09-23 20:47:31 +02:00
Reynir Björnsson 9a0fe69789 Add cryptoaarhus website 2020-09-11 18:44:15 +02:00
Jesper Hess 8bec174a46
Switch riot.data.coop->element.data.coop in riot's config.json 2020-08-31 18:57:49 +02:00
Jesper Hess 3e098546ef
Update gitea to v 1.12.3 2020-08-31 18:24:47 +02:00
Jesper Hess e7d69cd6df Merge pull request 'Gitea network werent autocreated' (#40) from rluch/ansible:rluch/fix-initially-missing-gitea-network into master 2020-08-31 05:50:05 +00:00
Jesper Hess 7926c861b2 Merge pull request 'Add element.data.coop for riot' (#42) from reynir/ansible:element into master 2020-08-31 05:49:20 +00:00
Reynir Björnsson d49a57792f Add element.data.coop for riot
Riot was renamed to element recently.
2020-08-23 11:33:45 +02:00
Jesper Hess 99cb94c94a
Update Riot and Synapse to latest 2020-08-15 17:21:12 +02:00
Jesper Hess ad243a5777
Fix problem with new.data.coop overwriting the old site 2020-06-10 20:15:13 +02:00
Vidir Valberg Gudmundsson 4cf48f13c0 Add new data.coop website. Fix postfix container for newest ansible. Comment out tt-rss. 2020-05-29 23:36:07 +02:00
Jesper Hess 5a5bb50e09
Upgrade synapse and riot to latest 2020-05-08 15:43:58 +02:00
Rasmus Lundsgaard Christiansen d49b943fd2 Gitea network werent autocreated 2020-04-12 16:34:52 +02:00
Jesper Hess 4f07b8edb2
Add file showing the variables contained in secrets.yml 2020-04-11 16:28:38 +02:00
Jesper Hess 09617dd35a
Move postfix network config to postfix.yml file instead of base services.yml file 2020-03-04 18:05:48 +01:00
Jesper Hess 98d4ab69cc Add ulovlig-logning.dk 2020-03-04 09:39:36 +00:00
Jesper Hess b454583e2c Merge pull request 'Upgrade Drone' (#39) from drone-upgrade into master 2020-03-02 09:43:50 +00:00
Jesper Hess f2a6aab2fe
Drone is working now 2020-03-01 13:47:09 +01:00
Jesper Hess e0f01bb78e
Upgrade Drone initial steps 2020-03-01 08:03:05 +01:00
Vidir Valberg Gudmundsson d51edc2922 Upgrade gitea. 2020-02-27 09:44:33 +01:00
Vidir Valberg Gudmundsson 47d7abe631 Upgrade synapse and riot. 2020-02-26 20:55:21 +01:00
Vidir Valberg Gudmundsson 6e94ac766b Upgrade portainer. 2020-02-26 20:27:05 +01:00
Jesper Hess 5f1bbae3de
Increase rate limiting for outgoing mails to support the needs of ulovliglogning 2020-02-06 21:47:43 +01:00
Jesper Hess cd2424999f
Add www.[domain] to hosted websites 2020-01-14 08:11:19 +01:00
Jesper Hess 4e0332cc79
Add www.[domain] to hosted websites 2020-01-14 08:10:03 +01:00
Jesper Hess ef3e0993da
Add www.[domain] to hosted websites 2020-01-14 07:58:32 +01:00
valberg 625e83e0d3 Merge branch 'add-ulovliglogning-website' of data.coop/ansible into master 2020-01-13 18:25:21 +00:00
Jesper Hess 1adc11e9c4 Add ulovliglogning.dk website to the stack 2020-01-13 19:24:54 +01:00
Jesper Hess 447b82326c
Add ulovliglogning.dk website to the stack 2020-01-13 17:29:09 +01:00
Jesper Hess edfd530afe
Upgrade Synapse to v1.7.1 and Riot v1.5.6 2019-12-19 11:18:41 +01:00
Jesper Hess 67443d23d4 Merge branch 'master' of deni/ansible into master 2019-11-28 10:26:50 +00:00
Denis Smajlović 9195016a40 Add user deni 2019-11-24 17:49:06 +00:00
valberg 2e5dc7158d Merge branch 'mailu-smtps' of reynir/ansible into master 2019-11-21 18:39:40 +00:00
Reynir Björnsson 6331805793 Add smtps port 2019-11-19 11:10:05 +01:00
Jesper Hess 97fe0e16ef Merge branch 'upgrade-matrix-riot' of data.coop/ansible into master
As above. Just forgot to merge :)
2019-11-11 09:03:31 +00:00
Jesper Hess 3f2c7b1547
Upgrade Synapse to v1.5.1 and Riot to v1.5.3 2019-11-11 09:56:02 +01:00
Jesper Hess 71664653b0
Upgrade to Synapse 1.0.0 and Riot-Web 1.2.1 2019-06-12 14:33:35 +02:00
Jesper Hess 57cf5103c5
Upgrade to Matrix 0.99.5 and Riot 1.2.0 2019-05-30 19:59:37 +02:00
Jesper Hess 5566be7da9
Make netdata update via ouroboros 2019-05-30 18:53:26 +02:00
Jesper Hess 70632c26c2
Add tt-rss service 2019-04-25 12:05:28 +02:00
Jesper Hess fb67e038a8
Upgrade riot to 1.0.7 2019-04-10 18:01:58 +02:00
Jesper Hess 999f266af5
Update synapse to v0.99.3 2019-04-10 17:53:46 +02:00
Jesper Hess e42937736e
Enable group/community creation for all matrix users 2019-04-10 17:46:39 +02:00
Jesper Hess ba28b1eb0c
Add SYNAPSE_CACHE_FACTOR env var 2019-03-30 09:35:04 +01:00
Jesper Hess 1f69fdc3b4
Rewrite matrix/riot to use docker_service 2019-03-15 19:34:27 +01:00
Víðir Valberg Guðmundsson ada37f206a Adding networks to mailu database container. 2019-03-15 18:19:21 +01:00
Víðir Valberg Guðmundsson 8b10f40edd Add portainer. 2019-03-15 12:38:36 +01:00
Jesper Hess 59319938b8
Upgrade riot to 1.0.3 2019-03-13 06:37:22 +01:00
Jesper Hess be65327ea9
Pin specific version of matrix 2019-03-11 17:34:34 +01:00
Jesper Hess 0775a77979
Reduce log level to WARN in Synapse 2019-03-10 21:15:21 +01:00
Jesper Hess fff9f1e9da
Extract matrix config to file, make sure everything still works as before 2019-03-07 21:28:54 +01:00
Jesper Hess fb0efacf40
Add volume folder for matrix 2019-03-07 13:23:10 +01:00
Jesper Hess 8b5e8a276b
Reduce log level to hopefully lighten the load 2019-03-05 20:00:20 +01:00
Jesper Hess 05eb677c3f
Add quotes in a couple of places 2019-03-05 15:17:53 +01:00
Víðir Valberg Guðmundsson a43c52e71e Fix stuff to get mailu to work. 2019-03-05 15:10:24 +01:00
Jesper Hess 02aa4e185f
Move docker_volumes variable def to more logical place 2019-03-05 14:47:58 +01:00
Reynir Björnsson 1ad44e19d3
Add reynir 2019-03-05 14:46:37 +01:00
Víðir Valberg Guðmundsson 6ffdac0c25 Fix mailu version variable. 2019-03-05 13:19:41 +01:00
Víðir Valberg Guðmundsson d0dd46e4f2 Rename to indicate j2 template. 2019-03-05 13:17:49 +01:00
valberg 85f60399d9 Merge branch 'service/mailu' of data.coop/ansible into master 2019-03-05 12:14:02 +00:00
Víðir Valberg Guðmundsson 6488abf0af Add mailu to services. 2019-03-05 13:13:16 +01:00
Víðir Valberg Guðmundsson 8a0a2bf0a0 Merge branch 'master' into service/mailu 2019-03-05 13:10:24 +01:00
Víðir Valberg Guðmundsson ae78c942d7 Use ansible_service to run mailu containers with docker compose. 2019-03-05 13:07:57 +01:00
Jesper Hess 0f398cef3f
Upgrade riot to 1.0.1 2019-03-05 10:59:32 +01:00
Jesper Hess d5602af999
Add haveged to base system packages 2019-03-05 10:31:31 +01:00
Jesper Hess 0c5ed48600
Upgrade CodiMD 2019-03-05 10:06:10 +01:00
Jesper Hess ae2873e4d9
vhost config file for matrix domain 2019-03-05 09:06:19 +01:00
Jesper Hess 4db622313d
Publish port for nginx to forward connections to 2019-03-05 09:04:47 +01:00
Jesper Hess fef1951d57
Add necessary nginx configs to get matrix federation to work 2019-03-05 08:37:16 +01:00
Jesper Hess 1f8b1827ff
Rearrange matrix+riot ansible script, move volumes to host mounts. 2019-03-05 08:36:30 +01:00
Jesper Hess 55c8e77254
Move openldap to volume mounts 2019-03-04 18:21:14 +01:00
Jesper Hess 2f413b3e99
Switch out watchtower with Ouroboros 2019-03-04 16:28:51 +01:00
Jesper Hess 9ff11808ce
Add watchtower to manage auto-update of containers 2019-03-03 15:45:35 +01:00
Jesper Hess 0c1e94323c
Add drone CI/CD pipeline 2019-03-03 15:17:08 +01:00
Jesper Hess 787f47d45e
Set restart policy on containers that were missing it 2019-03-03 07:38:00 +01:00
Víðir Valberg Guðmundsson f5bc79e636 Add network. 2019-03-02 23:25:07 +01:00
Víðir Valberg Guðmundsson f734e7608b Merge branch 'master' into service/mailu 2019-03-02 23:10:36 +01:00
Víðir Valberg Guðmundsson d25555d107 Initial mailu setup 2019-03-02 23:05:00 +01:00
Jesper Hess 1cd9b67b4e
Configure gitea container as per old server 2019-03-02 21:30:54 +01:00
Jesper Hess 24a3f4ab3d
Add volume folder for gitea 2019-03-02 21:16:00 +01:00
Jesper Hess 454fc751d2
Add VIRTUAL_PORT to gitea 2019-03-02 21:16:00 +01:00
Jesper Hess e30f05d3e4
Clean up gitea docker 2019-03-02 21:15:59 +01:00
Jesper Hess ea8804d31c
Add cryptohagen.dk website 2019-03-02 19:51:32 +01:00
Jesper Hess e118b30873
Deploy https://data.coop as a container 2019-03-02 19:24:42 +01:00
Jesper Hess 1400b18930
Set up authentication for local registry + log in 2019-03-02 19:15:37 +01:00
Jesper Hess 3b596c5701
Add docker registry container 2019-03-02 18:29:15 +01:00
Jesper Hess 92baab22a9
Rename of server in netdata 2019-02-28 20:51:30 +01:00
Jesper Hess eb36b822b3
Add netdata as docker container 2019-02-28 08:38:23 +01:00
Jesper Hess 53046bb85f
Add apparmor package 2019-02-28 08:28:54 +01:00
Jesper Hess df913b2622
Fix missing quotes in ENV variables 2019-02-28 08:22:38 +01:00
Víðir Valberg Guðmundsson 14e72b2a5c Pinning riot container. 2019-02-16 00:38:44 +01:00
Víðir Valberg Guðmundsson 200304dd17 Remove some redundancy. 2019-02-15 10:21:06 +01:00
Víðir Valberg Guðmundsson e5427616dc Adding some stuff to deploy.sh to make things easier - I think 2019-02-15 10:19:24 +01:00
valberg 8d1f3a4955 Merge branch 'codimd' of data.coop/ansible into master 2019-02-15 09:03:42 +00:00
Víðir Valberg Guðmundsson 3a2ac5cb6b Getting codimd to work. 2019-02-14 22:52:55 +01:00
Jesper Hess dcf8fe8087
Add codimd service. LDAP isn't working just yet 2019-02-13 21:17:48 +01:00
Víðir Valberg Guðmundsson fce600d56c Moving nginx volumes to bind volumes. 2019-02-13 10:36:04 +01:00
Víðir Valberg Guðmundsson 3def4b490b Some small fixes to privatebin. 2019-02-13 10:35:45 +01:00
Jesper Hess 6a47214cd6
Add pastebin to service list 2019-02-13 10:15:24 +01:00
Jesper Hess c7fe698bc2 Merge branch 'privatebin' of data.coop/ansible into master
Resolves #8
2019-02-13 09:10:39 +00:00
Jesper Hess 26792454f4
Finalise privatebin service setup 2019-02-13 10:05:00 +01:00
Jesper Hess ca183eaf4d
Add privatebin config file 2019-02-13 10:04:40 +01:00
Jesper Hess d9921adae0
Add /docker-volumes folder structure for bind mounts 2019-02-13 10:04:22 +01:00
Víðir Valberg Guðmundsson 79149a4cba Adding some missing matrix stuff. Trying to get federation to work. 2019-02-13 09:49:22 +01:00
Jesper Hess 7a1e2c4b02
Fix typo 2019-02-13 08:54:05 +01:00
Jesper Hess 83935a8649
Add privatebin service 2019-02-13 08:50:42 +01:00
Víðir Valberg Guðmundsson fefbabcc33 Add postfix container. Get passit running with that. Fider is still not working. 2019-02-10 08:59:53 +01:00
valberg 0675539530 Merge branch 'matrix-riot' of data.coop/ansible into master 2019-02-09 21:47:13 +00:00
Víðir Valberg Guðmundsson 027c18f070 Update riot config. 2019-02-09 22:46:32 +01:00
Jesper Hess 76a0b411e9
Still fixing stuff 2019-02-09 18:49:03 +01:00
Jesper Hess 6805197c31
Fixing riot and matrix stuff 2019-02-09 17:00:47 +01:00
Jesper Hess ec930a6f0f
Add hostname for riot 2019-02-09 16:00:04 +01:00
Jesper Hess 8066a0e67d
Remove ssl requirement from matrix config 2019-02-09 15:56:20 +01:00
Jesper Hess f30f07eacb
Add riot.im.conf and stuff to matrix role 2019-02-09 15:43:15 +01:00
Jesper Hess e371b11e84
Add config.json for riot 2019-02-09 15:18:09 +01:00
Jesper Hess 3d09c8592f
Add matrix base_domain and set in synapse config 2019-02-09 15:07:16 +01:00
Jesper Hess ac7b6a17cb
Make vagrant ask for ansible vault password 2019-02-09 15:00:15 +01:00
Jesper Hess 5f1e4e02ef
Use bionic release of docker for Ubuntu 2019-02-09 14:59:45 +01:00
Víðir Valberg Guðmundsson f97eb0e8ed
Initial matrix/riot stuff. 2019-02-09 14:34:04 +01:00
Víðir Valberg Guðmundsson 05f5628de2 Hardcoding ldap filters for now. 2019-02-09 14:33:21 +01:00
Víðir Valberg Guðmundsson 69d53c26e9 Update server address. Remove published ports (nginx proxy does it). 2019-02-09 12:21:53 +01:00
Víðir Valberg Guðmundsson b2a532c258 Get rid of all docker compose files and use ansible modules to create resources. 2019-01-26 17:54:45 +01:00
106 changed files with 4291 additions and 347 deletions

111
.ansible-lint Normal file
View File

@ -0,0 +1,111 @@
---
# .ansible-lint
profile: null # min, basic, moderate,safety, shared, production
# exclude_paths included in this file are parsed relative to this file's location
# and not relative to the CWD of execution. CLI arguments passed to the --exclude
# option are parsed relative to the CWD of execution.
exclude_paths:
- .cache/ # implicit unless exclude_paths is defined in config
- .github/
- test/fixtures/formatting-before/
- test/fixtures/formatting-prettier/
# parseable: true
# quiet: true
# strict: true
# verbosity: 1
# Mock modules or roles in order to pass ansible-playbook --syntax-check
mock_modules:
- zuul_return
# note the foo.bar is invalid as being neither a module or a collection
- fake_namespace.fake_collection.fake_module
- fake_namespace.fake_collection.fake_module.fake_submodule
mock_roles:
- mocked_role
- author.role_name # old standalone galaxy role
- fake_namespace.fake_collection.fake_role # role within a collection
# Enable checking of loop variable prefixes in roles
loop_var_prefix: "{role}_"
# Enforce variable names to follow pattern below, in addition to Ansible own
# requirements, like avoiding python identifiers. To disable add `var-naming`
# to skip_list.
# var_naming_pattern: "^[a-z_][a-z0-9_]*$"
use_default_rules: true
# Load custom rules from this specific folder
# rulesdir:
# - ./rule/directory/
# Ansible-lint completely ignores rules or tags listed below
skip_list:
- skip_this_tag
# Ansible-lint does not automatically load rules that have the 'opt-in' tag.
# You must enable opt-in rules by listing each rule 'id' below.
enable_list:
- empty-string-compare # opt-in
- no-log-password # opt-in
- no-same-owner # opt-in
# add yaml here if you want to avoid ignoring yaml checks when yamllint
# library is missing. Normally its absence just skips using that rule.
- yaml
# Report only a subset of tags and fully ignore any others
# tags:
# - jinja[spacing]
# Ansible-lint does not fail on warnings from the rules or tags listed below
warn_list:
- skip_this_tag
- experimental # experimental is included in the implicit list
# - role-name
# - yaml[document-start] # you can also use sub-rule matches
# Some rules can transform files to fix (or make it easier to fix) identified
# errors. `ansible-lint --write` will reformat YAML files and run these transforms.
# By default it will run all transforms (effectively `write_list: ["all"]`).
# You can disable running transforms by setting `write_list: ["none"]`.
# Or only enable a subset of rule transforms by listing rules/tags here.
# write_list:
# - all
# Offline mode disables installation of requirements.yml
offline: false
# Return success if number of violations compared with previous git
# commit has not increased. This feature works only in git
# repositories.
progressive: false
# Define required Ansible's variables to satisfy syntax check
extra_vars:
foo: bar
multiline_string_variable: |
line1
line2
complex_variable: ":{;\t$()"
# Uncomment to enforce action validation with tasks, usually is not
# needed as Ansible syntax check also covers it.
# skip_action_validation: false
# List of additional kind:pattern to be added at the top of the default
# match list, first match determines the file kind.
kinds:
# - playbook: "**/examples/*.{yml,yaml}"
# - galaxy: "**/folder/galaxy.yml"
# - tasks: "**/tasks/*.yml"
# - vars: "**/vars/*.yml"
# - meta: "**/meta/main.yml"
- yaml: "**/*.yaml-too"
# List of additional collections to allow in only-builtins rule.
# only_builtins_allow_collections:
# - example_ns.example_collection
# List of additions modules to allow in only-builtins rule.
# only_builtins_allow_modules:
# - example_module

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
playbook.retry
*.retry
*.sw*
.vagrant/
*.log
.idea/
venv/

14
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,14 @@
repos:
#- repo: https://github.com/semaphor-dk/dansabel
# rev: b72c70351d1a9e32a75db505fcb3aa414f3282f8
# hooks:
# - id: dansabel
- repo: https://github.com/ansible/ansible-lint
rev: v6.9.0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
additional_dependencies:
- ansible

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
init: create_venv install_pre_commit install_ansible_galaxy_modules
create_venv:
python3 -m venv venv
venv/bin/pip install -U pip
venv/bin/pip install ansible pre-commit
install_pre_commit:
venv/bin/pre-commit install
install_ansible_galaxy_modules:
venv/bin/ansible-galaxy collection install community.general

108
README.md Normal file
View File

@ -0,0 +1,108 @@
# data.coop infrastructure
This repository contains the code used to deploy data.coop's services
and websites. We use Ansible to encode our infrastructure setup. Only
the association's administrators have access to deploy the services.
## Deploying
To deploy the services, the included `deploy.sh` script can be used. The
Ansible playbook uses two custom-made roles (in the `roles/` directory):
- `ubuntu_base` - used to configure the host itself and install the
necessary packages
- `docker` - used to deploy our services and websites with Docker
containers
The script has options to deploy only one of the roles. Select services
only can also be specified. By default, the script deploys everything.
Here is a summary of the options that can be used with the script:
```sh
# deploy everything
./deploy.sh
# deploy the ubuntu_base role only
./deploy.sh base
# deploy user setup only
./deploy.sh users
# deploy the docker role only
./deploy.sh services
# deploy SINGLE_SERVICE Docker service only
./deploy.sh services SINGLE_SERVICE
```
`SINGLE_SERVICE` should match one of the service names in the `services`
dictionary in `roles/docker/defaults/main.yml` (e.g. `gitea` or
`data_coop_website`).
## Testing
In order for us to be able to test our setup locally, we use Vagrant to
deploy the services in a virtual machine. To do this, Vagrant and
VirtualBox must both be installed on the development machine. Then, the
services can be deployed locally by using the `vagrant` command-line
tool. The working directory needs to be the root of the repository for
this to work properly.
> Note: As our secrets are contained in an Ansible Vault file, only the
> administrators have the ability to run the deployment in Vagrant.
> However, one could replace the vault file for testing purposes.
Here is a summary of the commands that are available with the `vagrant`
command-line tool:
```sh
# Create and provision the VM
vagrant up
# Re-provision the VM
vagrant provision
# SSH into the VM
vagrant ssh
# Power down the VM
vagrant halt
# Power down and delete the VM
vagrant destroy
```
The `vagrant` command-line tool does not support supplying extra
variables to Ansible on runtime, so to be able to deploy only parts of
the Ansible playbook to Vagrant, the `deploy.sh` script can be used with
the `--vagrant` flag. Here are some examples:
```sh
# deploy the ubuntu_base role only in the Vagrant VM
./deploy.sh --vagrant base
# deploy SINGLE_SERVICE Docker service only in the Vagrant VM
./deploy.sh --vagrant services SINGLE_SERVICE
```
Note that the `--vagrant` flag should be the first argument when using
the script.
## Contributing
If you want to contribute, you can fork the repository and submit a pull
request. We use a pre-commit hook for linting the YAML files before
every commit, so please use that. To initialize pre-commit, you need to
have Python and GNU make installed. Then, just run the following shell
command:
```sh
make init
```
## Nice tools
- [J2Live](https://j2live.ttl255.com/): A live Jinja2 parser, nice to
test out filters

47
Vagrantfile vendored
View File

@ -1,23 +1,38 @@
Vagrant.require_version ">= 1.7.0"
Vagrant.require_version ">= 2.0.0"
PORT = 19022
def provisioned?(vm="default", provider="virtualbox")
File.exist?(".vagrant/machines/#{vm}/#{provider}/action_provision")
end
Vagrant.configure(2) do |config|
config.vm.network :private_network, ip: "192.168.56.10"
config.vm.network :forwarded_port, guest: PORT, host: PORT
config.vm.define "datacoop" do |datacoop|
datacoop.vm.box = "ubuntu/bionic64"
datacoop.vm.hostname = "datacoop"
datacoop.vm.provider "virtualbox" do |v|
v.memory = 4096
end
datacoop.vm.network "private_network", ip: "192.168.0.42"
datacoop.vm.provision "ansible" do |ansible|
ansible.verbose = "v"
ansible.compatibility_mode = "2.0"
ansible.playbook = "playbook.yml"
ansible.host_vars = {
"datacoop" => {"ansible_python_interpreter" => "/usr/bin/python3.6"}
config.vm.box = "ubuntu/focal64"
config.vm.hostname = "datacoop"
config.vm.provider :virtualbox do |v|
v.cpus = 8
v.memory = 16384
end
config.vm.provision :ansible do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "playbook.yml"
ansible.ask_vault_pass = true
ansible.verbose = "v"
# If the VM is already provisioned, we need to use the new port
if provisioned?
config.ssh.guest_port = PORT
ansible.extra_vars = {
ansible_port: PORT,
from_vagrant: true
}
ansible.groups = {
"all" => ["datacoop"]
else
ansible.extra_vars = {
from_vagrant: true
}
end
end

View File

@ -1,2 +1,8 @@
[defaults]
remote_user = root
ask_vault_pass = True
inventory = datacoop_hosts
interpreter_python = /usr/bin/python3
remote_user = root
retry_files_enabled = True
use_persistent_connections = True
forks = 10

View File

@ -1,16 +1,5 @@
######################################
### All hosts
10.1.1.198 ansible_python_interpreter=/usr/bin/python3
10.1.1.199 ansible_python_interpreter=/usr/bin/python3
[production]
hevonen.servers.data.coop ansible_port=19022
######################################
### Application servers
[servers]
10.1.1.198
10.1.1.199
[datacoop1]
10.1.1.198
[datacoop2]
10.1.1.199
[monitoring]
uptime.data.coop

50
deploy.sh Normal file → Executable file
View File

@ -0,0 +1,50 @@
#!/bin/sh
usage () {
{
echo "Usage: $0 [--vagrant]"
echo "Usage: $0 [--vagrant] base"
echo "Usage: $0 [--vagrant] users"
echo "Usage: $0 [--vagrant] services [SERVICE]"
} >&2
}
BASE_CMD="ansible-playbook playbook.yml"
if [ "$1" = "--vagrant" ]; then
BASE_CMD="$BASE_CMD --verbose --inventory=vagrant_host"
VAGRANT_VAR="from_vagrant"
shift
fi
if [ -z "$(ansible-galaxy collection list community.general 2>/dev/null)" ]; then
echo "Installing community.general modules"
ansible-galaxy collection install community.general
fi
if [ -z "$1" ]; then
echo "Deploying all!"
$BASE_CMD
else
case $1 in
"services")
if [ -z "$2" ]; then
echo "Deploying all services!"
eval "$BASE_CMD --tags setup_services $(test -z "$VAGRANT_VAR" || printf '%s' "$VAGRANT_VAR=true")"
else
echo "Deploying service: $2"
$BASE_CMD --tags setup_services --extra-vars '{"single_service": "'"$2"'"'"$(test -z "$VAGRANT_VAR" || printf '%s' ', "'"$VAGRANT_VAR"'": true')"'}'
fi
;;
"base")
eval "$BASE_CMD --tags base_only $(test -z "$VAGRANT_VAR" || printf '%s' "$VAGRANT_VAR=true")"
;;
"users")
eval "$BASE_CMD --tags setup-users $(test -z "$VAGRANT_VAR" || printf '%s' "$VAGRANT_VAR=true")"
;;
*)
usage
exit 1
;;
esac
fi

View File

@ -1,15 +0,0 @@
---
users:
graffen:
comment: Jesper Hess Nielsen
key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbxFVukt5TIzoB0HX2q8b8lHJmXD1juzsWOu5XkexVDlCsvupa1cZ/OVkrIEAbDKk6RmJQj0TJ2O5+v9hbf0TDi0Pi+V8ADZIgO+OW5a4EeXsU72a4CN0nEocQhUPfQuC4IU+F7icoG2/I9jXg7U6p1LhBr8vlC3cNHnrH3yqrakrUR51/iRVIwo4FKvQg7jutaKTyOjlYa1uTdaczvAzNHWEdytCQgFnkzpR9fHvzkA79qHUD9n32rIpJicRJsHY3NnyDGfBcDv+4sLq15sM9jN83duGnSuMMtZgfSriwMUd/UwVReU2ZKxjMLe3WHB7+ZE/p39OJk/gjVfWJVh/za1/teTAwaLLmxh/HFt+AVYWkCj22fUxscl0dh2zy6Ki1Ua3ApChn6v6Gvng6khobFlxawSJZ49+0KoAl1qqFMR1o9EGWvqgDPuITAqJFN+ik0jxcxfmKrG3mbOYM1ikhJd0ER8wbS8e6NowHUBV7PUyDqxP5VM2gum58IYrDqaP2RYYi9vWWnXJJA8J1t+Wp3bF7fdktyVgkd7HQk02uVkxdMQQ802GCrQQuvJhWTCzrgkgrjPY8p0KcbCNt6jYQOUKV0T2vp6PbTJ5XWKb5u7gVXW1xiP9dYzgAr0DroiTK4xIuF80mv1Rfst0ceHAIQVcQ3GcGbh000QUYzbHT2Q== openpgp:0x265EE03C (Graffen)
password: $6$6bgPWZ76LvB$DZ3ipFsFtL2b1nSC0AQ63k8ibJidyIE9iIsWWzY0fux0ynz9L/o7b2sR2XYSaDuG.jewFV36IGStTF3NCZRC30
groups:
- sudo
valberg:
comment: Vidir Valberg Gudmundsson
key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUmGeHc6QXDcJHkmVxbTUv04Q3vs20avquoGr6eOkkvYbcgjuFnBOOtvs2Nul1odcvvnHa1nN7DfL8XJamiwsB1B/xe2seaNS1axgwk9XowlVN9pgga8gsC+4gZWBtSObG2GR8n4NtPENzPmW5deNn8dRpTvULPMxZ0VRE9yNQOx8v8w85yYh+vxbbkWGVDYJU23yuJI50U9y6bXxNHinsACDFBeR/giXDlw29TaOaSxz0R6zrRPBoX+V68RyWwBL+KWQKtX2ULtJI40S98Ohd6p41bIxYHCBS/zroqNne8PjYOLcHHsjHUGfTvhcS5a3zdz/iHsvsaOOjFjsydAXH valberg
password: $6$qt3G.E.CxhC$OwBDn4rZUbCz06HLEMBHjgvKjxiv/eeerbklTHi.gpHIn1OejzX3k2.0NM0Dforaw6Yn5Y8Cgn8kL2FdbQLZ3/
groups:
- sudo

170
group_vars/all/secrets.yml Normal file
View File

@ -0,0 +1,170 @@
$ANSIBLE_VAULT;1.1;AES256
30613439636234396439623634656338666330643936373563656336323831353464353239353661
6234316535383838653865643964353033623935313432630a666563316534343733363464396635
34396664643137643136633837656432623633383361633336343562333039326538393034616637
6634613631636433610a663835343739376534356133323163343132323233643135613333313132
65373233666535366137343839363938303561653731633038376631386161653038613631396364
33636131636536306134346336636332393436303063306262333430613137376438626133353963
66396332363335333436623335613966323730616139353762656662386530356435623831656632
30333363376132653362323339386437346134323232363336363461323332613962613131386264
37383435653061653466613834346430656632626338316564656136666266353231363661666461
32646461313365626232376536376463313531613861363462643062326538326234613332646430
33383438613961623134343665383638346164653031363435656162306163653232353162343431
38333239393332613466663231383932316330376535383466643233326134623530306361393639
63386530643733393033646139613730313239313866343730643337393533366330373363353338
62313739613531636166663135646262396334373538636634393534616337363337323630666261
39643164363437653661633666376431303662396431633661663933343666613234326637636231
38383537333532326636343366343564646630363838323162373339323365666262303836636232
31343637616261636130656637393633383165353332346239323063646162306235313962363935
64633639653261363563646664393630666564646165393736363562623231626634326163306630
37613635306136643334616364303439323332666431386264623265323636623738303364396636
37626161363466646166633434333265623236633033666562643264303662333363396631646638
36626636363261313966393235313866353936323064343331626362306162323166323063656433
63303762346330323031353034356162373433356436663134373930633634366330653233613139
63363639343833616431633765613938623037323961623663336662666135313466303661316133
39353664633036323031373862393530653433373062623233313965653735353566306538393439
30366162663138326535346639393337393362366630343266643035353465663332333539613337
30666666363134313239306231356663343166363137366636643931313039333732383833313036
37393064396662623063613462336363386336393839313465323062646535373733326338353766
31666639303836316266343764336462343765363930326338313635336633323662366238356264
38613631313434383830333031643938393566633236383861633266326336653033663163336132
61313132643062666434346333653234393865656463343363313636613364616361353561343739
38313231333431303664323730626162613264343630356438336636373739653234336666646438
37636437623336323461613063396137396533353265333034333435306666636261353933613232
65363632383039666666323030323830333534376362326136313232393732613166303461383933
62303166396533616538666566356238393265663163343264333664393936613066313665616137
38613030623937633730646461666233333035323661363835313161613930336237396332623338
30666166636662613130363430333436613532326437393730376536353963356633393736303065
31393534646537323037316664313438643836386333613961663031383231663932633934656461
62313163616635626131663961326438396439383432346337386261313330343330353637376330
38346532396533326135303264613361663836646163623630323832653032396237353966663661
36353365313962663832393333336138346335363832396535346336643565366465643565616638
63616565356663623531323935393334326639626236353338643237343764366464666131393332
64396665343535323339383434366133613235313866653663313639633930323864646536346232
65316465643662376264373536393232326666663335316631376433343062646361376165363732
66326165643163333737313139386461363431353239626236366238343035386663363435366464
31633738336263633961306436613233303861633263343030336637373165663261316632663537
31613636663163323365303038373134306264343831326264326261633834393366623061616262
63393463333833393636666232626662643738653634306364326231343830633834643664353730
37346131346263356539363630363230626364663161643064323538396131636633623866383939
66346434323935353632633837363530663438636539616130633532346236343661633766383434
34343339646662393030323661623665643432376365633435666333316439356631386234303062
35346631656230346565323130333765663933373638303639363530373431343232393864656639
33666433366131396464323137393239653531376662646235343962613639343831636261326265
65663564613766313634653938316339306434663463623563316431633234323330623738646636
37643535623664323433626561383462393033343232303838333930653366376536353765613036
35663165623265616630373161336632646435613331373166303632373633313865386134636362
61636134343839643735636461626663626237613262316564646339323933363864303935353834
39396637646264633736366336616336643032313237653662646331383963366533373766356539
35306165306534393463663332336430336635666135643561303935386635393838323865623162
36323565616232353261303139623465646234313136383436376162376165303664613164356162
33373237333666616135636231653637396330663930663962636161326664333261343737343735
37313465396130653138613539376436373237343138636535626632326435383234326466363235
34646663653038396630353637636166346261346233333632363361326536383634663433613564
35633864343630333033613133626635313931333031643564396164393135346131343832363861
61366664363838653438653137383933386233633836323332643531303936353237623734666135
31356166613664636634336536343032646239643130346564303162356431346539646336323339
61626236346535336638353134353838333434663838303730613363393365633739383563613434
64336331306639323061386338656361653636353831346237373134346538623464343562393735
39333764343139333133393233626564643266373034623764633835383561366265636632633937
62343635343161363231653138613263313562366439316435633964396161343566316435303465
39666236316339653839313333396264623636663561653932386638366366663933353761353162
61343038383939396231346534336361306430373564353633653139306334623630343738636430
66376631366662313131646130363530323232383535333163363466636262363461633232343532
63626430336261353861633362396638643937623832386638626334663333363637393637373939
64303039666432303535636265613564376139333331653336666563663238366639393366363334
36303635633933333832396562373965653361303034653139643466656534326231383162336366
31656138656539383539396462326134333331653131306537643962653762373035343235333233
34373730623663346430303962653061623330653263393633383835663739663961326566323036
30336365616532303362396230616531386639333636336332366335613935623836616134393033
62653535396630383436393631396337336163323361663930323532633666663238333366383462
36393261376262643336643761613731643032626632646332366661626331333233363436613937
34653731666137313733653863396164323963383037353265373532303137623037343733616537
66336433343334626536323639636139653931383466633833326234633332613431353432343561
36626339656536383862623833633634356435393764316633353135326639623534366538313330
62633333303266613630326330333336353264343937393864393239623664323366373565383334
37383237376664643065383834633961366632643261343635336335353765353863323131653866
31326531303461323736303730623638663863353939636437636231636437323730656463633733
65383934343534383631363162363830386365313935663337366335326131393262353030663765
30643665383332613030336439346332363135366232303166623534333637366133656437643231
30306634636430643864363561316334383530613165326663326665613633636237353830393334
62653333623563626131666166646335663334393662336337333836376631303631666136376332
37316537356531346464623363653033306537636239633065646533643239653063613835363665
30383139326465613864316533643033333430326230646334353364633138666532353736313265
34623733613864646661353730666433613961643261346166303264386435643565373565323864
61346465336231613865363263303034396439346163393534666439666437353266323565653032
39386439646438313938356237643831643434666161383632316530356465616632313235643834
33303865653836303632656663366465333331616634313863656438393838636631313364633637
38646230643734393733663261326161376536643237626130353831363731306231313864613066
34623239396362336639363163313161323065653461363563353631613730373830643133336464
31336439636361363539383539323631303462633833353032373530333539336538363033383363
32613733623839623938326165356237313165383366646233393933393965613363666532646434
63316133613130313363303537366230646235663130313538333761633237383262316633366364
65373664616237316534613831313966623939396331626334313430386638653461386334363939
35333339643837666264356535643365353331393437313866643034663934336466336534343035
61313837666662343363613962623462333935353837333336363839623466303534303837396634
38656330666661356235626130303538666533666563323936633564383164633834353831306634
36343836353464623962333362353133386563343831336463646635646263383832666232323736
38613730316634373365343938623237356231643931303333366462373134383137366339613662
62643832323734363635643634373066303366306366663036623139393761636533326130313336
30316536396466383463393233363035393335343565323635333665346464366139626165636661
39363066643437613537653836636363376532643038363063383234353066313737663061363334
38306563613561663165623630366135303332636133343733343836383865613661393761333031
62653162626461616564643138613737623632313739393962396439306133646138303936636435
39393663653865363166316365376562353461633163353734343132343831386434653037323732
36356162356336616330636630376438636165653439376137313934663939376639396266323962
37383736333536653438363963316435326632393966383534326337303336386135616636363936
35393331313938653830646332376631623763383439623633396433633739663038313264323835
33373664313562366664363630316132643465363964383339363339656237323465626262306364
33306133373065303135613235623262396365363634316365356364373561363762666235666430
62336362643564313238363933623366396138646237336336623062326161326536323534326364
39316162643966616436343737313434616230346237346237363962653033613930623462386431
38343662356665383763633034393236613733643430313937326335356466376139653533333965
39386138623134666132663837616637376362303561393133656139653438386363613965393661
36343566643931393061373031343331336463643034383065383763663234373438383064303232
64666236313935346237666466333562613935646163653331303661386138313739326538353935
64323737323532663731353136336138633533386464616362333838396332323563353537613430
33633631326238366166346437316638363161386562383630623466386564323266333033313461
63666535363034613232346239636233623130393032353030363334333531646238373262323765
61373739396162643661353031613663353531653836323730326166383463613330333966336233
30386136346466336361303237303534373064353230653238363231633530613866663461643465
30396266356164353063323432663561396564636231346534366661663766613634376235356637
39313839616336666461313431326430333932623262333437386464636264373430653566386631
64653866623662363864376663613136306165393863346533303634623936373835633864313462
61333562646233303232623861366634383466633537383831626334356561353637663038643531
39386635326366646134333231653737653630356135396634326537633232333166616161653136
33393562383233656564356530386465623239386666313964343534343466616134373132636631
39666365393063323838343963366339373434353839383039383238613133636237316365323861
30626330643665626465666338353030653839383234393237623633646566376361646536353233
31393235623561323765633835313139313538343761393064353632316335656231353930656437
31313639313931636633333230653730666638373864326239333561393134356632623138366131
65356462373336383039316131626562633330666363386631383663343838393435663538343934
65386339626362623664393532386131303234633466363437383236616463343831353862323961
39663835313234326137303965663963663761656531653437343234643634316565333762663139
65393830633237623031303234636134633539316131396135616237316266333437633861303831
62656630373763343366636635653033666630613533363365636261323661383364343161343439
35626531346665656263643461306261376238353033343032353731373861333239333862653231
31336562653133623163353230633331346237356534333534613161323462636639636662623435
63633035336662376636623339326433393035646539626231363762643532323463316263393736
62613038333733636362356636373331313661663830633433643039653233626261613739663836
38643030313338383266323134326337323334343230623331386664333937316266623134336362
61373037353664623863393233376264616438656332386130316361663665323135386463383763
33303633356133353439393664363630336133306364363430393232326665393339323265383630
31656463343064383837333630366465396633393465666235626330343937313630623039383465
63326361663238653035613935343932623237396362643833313731323830313962616362613539
32346165303930323739313837643933363863643937346561643930653530393636383036613235
61376166386563643733333233343437623630323632643463353131386461663936313065313562
31393032646262386634353436643466323731366631393136393433616332613036666163336635
37303365633338613630656463663533653336666562653236336264303238383930383132346365
35386662636439653930343738633265363635626132343030653462306431363234633635643537
61666363346430653131623762666564313665653262386332396532646339383136383337353863
38386632316632373338653535323335363265653563376330663239343861346563646366313039
33306364623536346339393566326533633133393866303535326535306435626531346264616138
34356231373561633337653663643566633632393330386564393966666365306565316135646163
63366365383839343134303635376233343865663631633331333230616630366633396231333435
30366137383238393139336433353764633038616238326136663636656132626538393565393130
38653765326137393136386233383636383165613235373437353730306564643033306534386666
61623538663537653166313264303533623162356134393333373732383535386261333535383039
65613166666230336265366335323434636336663835323034373930393430363065376665666337
35363265666130653830333536326433316639613638613730666139623137333736663535633032
33363135376636636536623731323134343237393633333038393364376237386165

View File

@ -0,0 +1,57 @@
# These are the variables contained in secrets.yml
# Secrets are usually 32 characters or more, matching [a-Z0-9]
---
postgres_passwords:
nextcloud: xxx
passit: xxx
gitea: xxx
matrix: xxx
mailu: xxx
keycloak: xxx
hedgedoc: xxx
mastodon: xxx
rallly: xxx
membersystem: xxx
ldap_admin_password: xxx
ldap_config_password: xxx
passit_secret_key: xxx
docker_password: xxx
mailu_secret_key: xxx
nextcloud_secrets:
redis_password: xxx
drone_secrets:
oauth_client_id: xxx
oauth_client_secret: xxx
rpc_shared_secret: xxx
restic_secrets:
repository_password: xxx
ssh_privkey: xxx
uptime_kuma_url: xxx
matrix_secrets:
registration_shared_secret: xxx
macaroon_secret_key: xxx
form_secret: xxx
keycloak_secrets:
admin_user: xxx # used for setting up the initial admin user on first run
admin_password: xxx
mastodon_secrets:
secret_key_base: xxx
otp_secret: xxx
vapid_private_key: xxx
vapid_public_key: xxx
rallly_secrets:
secret_password: xxx
membersystem_secrets:
secret_key: xxx

35
group_vars/all/vars.yml Normal file
View File

@ -0,0 +1,35 @@
# vim: ft=yaml.ansible
---
users:
- name: graffen
comment: Jesper Hess Nielsen
password: '!'
groups: []
ssh_keys: []
- name: valberg
comment: Vidir Valberg Gudmundsson
password: $6$qt3G.E.CxhC$OwBDn4rZUbCz06HLEMBHjgvKjxiv/eeerbklTHi.gpHIn1OejzX3k2.0NM0Dforaw6Yn5Y8Cgn8kL2FdbQLZ3/
groups:
- sudo
ssh_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUmGeHc6QXDcJHkmVxbTUv04Q3vs20avquoGr6eOkkvYbcgjuFnBOOtvs2Nul1odcvvnHa1nN7DfL8XJamiwsB1B/xe2seaNS1axgwk9XowlVN9pgga8gsC+4gZWBtSObG2GR8n4NtPENzPmW5deNn8dRpTvULPMxZ0VRE9yNQOx8v8w85yYh+vxbbkWGVDYJU23yuJI50U9y6bXxNHinsACDFBeR/giXDlw29TaOaSxz0R6zrRPBoX+V68RyWwBL+KWQKtX2ULtJI40S98Ohd6p41bIxYHCBS/zroqNne8PjYOLcHHsjHUGfTvhcS5a3zdz/iHsvsaOOjFjsydAXH valberg
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4FRrbTpxwGdlF6RVi/thJaMlaEE0Z9YCQA4Y+KnHbBoVWMjzgbIkSWw3MM+E/iiVnix8SFh4tjDSdFjb8lCvHt/PqhMFhZJ02vhVgSwyU+Ji5ur23i202LB9ua54NLN4kNG8K47U0tKi2/EV6LWl2QdRviAcOUctz6u9XDkkMLUgPEYH384XSTRRj4GJ8+0LRzB2rXqetH3gBe9v1vlv0ETYWvzTnpfZUxcrrqEGtXV9Wa0BZoWLos2oKOsYVjNdLZMoFpmyBxPnqzAi1hr7beblFZKqBkvD7XA9RnERbZn1nxkWufVahppPjKQ+se3esWJCp6ri/vNP4WNKY3hiIoekBLbpvGcP1Te7cAIQXiZOilN92NKKYrzN2gAtsxgqGZw7lI1PE71luGdPir2Evl6hPj6/nnNdEHZWgcmBSPy17uCpVvZYBcDDzj8L3hbkLVQ3kcLZTz6I8BXvuGqoeLvRQpBtn5EaLpCCOmXuKqm+dzHzsOIwh+SA5NA8M3P0=
- name: reynir
comment: Reynir Björnsson
password: $6$MiPv.ZFlWnLHGNOb$jdQD9NaPMRUGaP2YHRJNwrMPBGl9qwK0HFhI6x51Xpn7hdzuC4GIwvOw1DJK33sNs/gGP5bWB0izviXkDcq7B0
groups:
- sudo
ssh_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJl8/rikIUnqr9fPF3rE0rjWHCNzte10LvkjGmpdO9ka/NubQ7O25fp08rC+n0d1pUooYwHBAgiv9Hsql6HF9QfNKNUp7IKp7CXWcjb4ga02kuzWGSXjm40Vf0jSadIrJ33M4SeJHTByDGoeYPQBQ7n+qHdwcqJADBQygBuc5sRzxm8i0sbmzF3DJDDVeTJjEY5pfR4vnJlpmU8SC2d1ZkhCjmKCsL0PShntTIt1ztCt0yO71KoHKaNPu1jutGxcU9u7J1pEqcPT6EzU/cQJ4DMVzrGp26nIV0msRl3NeGNjukwXOzAh6KmsmXG7yWFyQmLRqgc/bjUeyhuWJ10vwUbaYVeIef7YrgEOgnkYLIFeWRMhdnwtL/W8g1D66SFx7+iYJj180eTi8Lc8rZm2NaiGynvWlFcJ4PGdTYZsWcFzQ+SaDziNMw1H3IixxdlD8Shw9mxpijJ+A4dH2kkUXyGVsc13zRIU7hq9ax8nrw6HVLGFLn09rEPig+SkyWrqRpRGMBWyqTRJywIV6jk0ll+i8rJZA2McY0rABbACrzXT5VBj5dLKnnRITLDicAYgt7YuEiQ0ffErQrPXXHUVeI0QKnJgplSHxH5QsX9a1Y+NoaoditdMT2bjvEqROi+/JYRycLR/BQV/d2nFPhqwq1x1AFvL4f8UvVH/hxp3PXWw== reynir yubikey
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPR8t/wNRp7Dt3wr9uZKVTofTDVYrcoQNru5ETxL+37t reynir@spurv
- name: samsapti
comment: Sam Al-Sapti
password: $6$18dN367fG162hQ9A$Aqkf3O24Ve1btzh1PPOPg3uyydv/AQYUxethcoB4klotebJq3/XsydYT7XBuarxfDccVwyPTMlsP3U8VfQpG60
groups:
- sudo
ssh_keys:
- sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIFWZGLov8wPBNxuvnaPK+8vv6wK5hHUVEFzXKsN9QeuBAAAADHNzaDpzYW1zYXB0aQ== ssh:samsapti
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPd/4fQV7CL8/KVwbo/phiV5UdXFBIDlkZ+ps8C7FeRf cardno:14 336 332

View File

@ -1,17 +1,27 @@
# vim: ft=yaml.ansible
---
- hosts: all
gather_facts: False
- hosts: production
gather_facts: true
become: true
vars:
# Services are the names of the compose files in docker/files/composefiles
services:
- nginx-proxy
- thelounge
- gitea
- nextcloud
ldap_dn: "dc=data,dc=coop"
vagrant: "{{ from_vagrant is defined and from_vagrant }}"
letsencrypt_enabled: "{{ not vagrant }}"
base_domain: "{{ 'datacoop.devel' if vagrant else 'data.coop' }}"
letsencrypt_email: "admin@{{ base_domain }}"
smtp_host: "postfix"
smtp_port: "587"
services_exclude:
- uptime_kuma
tasks:
- import_role:
name: ubuntu_base
tags:
- base_only
- import_role:
name: docker

View File

@ -0,0 +1,227 @@
# vim: ft=yaml.ansible
---
volume_root_folder: "/docker-volumes"
volume_website_folder: "{{ volume_root_folder }}/websites"
services:
### Internal services ###
postfix:
domain: "smtp.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/postfix"
pre_deploy_tasks: true
version: "v3.6.1-alpine"
nginx_proxy:
volume_folder: "{{ volume_root_folder }}/nginx"
pre_deploy_tasks: true
version: "1.3-alpine"
acme_companion_version: "2.2"
openldap:
domain: "ldap.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/openldap"
pre_deploy_tasks: true
version: "1.5.0"
phpldapadmin_version: "0.9.0"
netdata:
domain: "netdata.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/netdata"
version: "v1"
portainer:
domain: "portainer.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/portainer"
version: "2.19.0"
keycloak:
domain: sso.{{ base_domain }}
volume_folder: "{{ volume_root_folder }}/keycloak"
version: "22.0"
postgres_version: "10"
allowed_sender_domain: true
restic:
volume_folder: "{{ volume_root_folder }}/restic"
pre_deploy_tasks: true
remote_user: dc-user
remote_domain: rynkeby.skovgaard.tel
host_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLGol2G+a87ssy0nu/STKBZSiGyhZhZKx/ujfe9IeFo
repository: restic
version: "1.7.0"
disabled_in_vagrant: true
# mail dance
domain: "noreply.{{ base_domain }}"
allowed_sender_domain: true
mail_from: "backup@noreply.{{ base_domain }}"
docker_registry:
domain: "docker.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/docker-registry"
pre_deploy_tasks: true
post_deploy_tasks: true
username: "docker"
password: "{{ docker_password }}"
version: "2"
### External services ###
nextcloud:
domain: "cloud.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/nextcloud"
pre_deploy_tasks: true
version: 28-apache
postgres_version: "10"
redis_version: 7-alpine
allowed_sender_domain: true
forgejo:
domain: "git.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/forgejo"
version: "1.21.8-0"
allowed_sender_domain: true
passit:
domain: "passit.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/passit"
version: stable
postgres_version: 15-alpine
allowed_sender_domain: true
matrix:
domain: "matrix.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/matrix"
pre_deploy_tasks: true
version: v1.98.0
postgres_version: 15-alpine
allowed_sender_domain: true
element:
domain: "element.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/element"
pre_deploy_tasks: true
version: v1.11.51
privatebin:
domain: "paste.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/privatebin"
pre_deploy_tasks: true
version: "20221009"
hedgedoc:
domain: "pad.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/hedgedoc"
pre_deploy_tasks: true
version: 1.9.9-alpine
postgres_version: 10-alpine
data_coop_website:
domain: "{{ base_domain }}"
www_domain: "www.{{ base_domain }}"
volume_folder: "{{ volume_website_folder }}/datacoop"
pre_deploy_tasks: true
version: stable
staging_domain: "staging.{{ base_domain }}"
staging_version: staging
slides_2022_website:
domain: "2022.slides.{{ base_domain }}"
volume_folder: "{{ volume_website_folder }}/slides-2022"
version: latest
fedi_dk_website:
domain: fedi.dk
volume_folder: "{{ volume_website_folder }}/fedidk"
version: latest
vhs_website:
domain: vhs.data.coop
volume_folder: "{{ volume_website_folder }}/vhs"
version: latest
cryptohagen_website:
domains:
- "cryptohagen.dk"
- "www.cryptohagen.dk"
volume_folder: "{{ volume_website_folder }}/cryptohagen"
ulovliglogning_website:
domains:
- "ulovliglogning.dk"
- "www.ulovliglogning.dk"
- "ulovlig-logning.dk"
- "www.ulovlig-logning.dk"
volume_folder: "{{ volume_website_folder }}/ulovliglogning"
cryptoaarhus_website:
domains:
- "cryptoaarhus.dk"
- "www.cryptoaarhus.dk"
volume_folder: "{{ volume_website_folder }}/cryptoaarhus"
drone:
domain: "drone.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/drone"
version: "1"
mailu:
domain: "mail.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/mailu"
pre_deploy_tasks: true
dns: 192.168.203.254
subnet: 192.168.203.0/24
version: "2.0"
postgres_version: 14-alpine
redis_version: alpine
mastodon:
domain: "social.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/mastodon"
pre_deploy_tasks: true
post_deploy_tasks: true
version: v4.2.8
postgres_version: 14-alpine
redis_version: 6-alpine
allowed_sender_domain: true
rallly:
domain: "when.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/rallly"
pre_deploy_tasks: true
version: "2"
postgres_version: 14-alpine
allowed_sender_domain: true
membersystem:
domain: "member.{{ base_domain }}"
django_admins: "Vidir:valberg@orn.li"
volume_folder: "{{ volume_root_folder }}/membersystem"
version: latest
postgres_version: 13-alpine
allowed_sender_domain: true
writefreely:
domain: "write.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/writefreely"
pre_deploy_tasks: true
version: v0.15.0
mariadb_version: "11.2"
allowed_sender_domain: true
watchtower:
volume_folder: "{{ volume_root_folder }}/watchtower"
version: "1.5.3"
diun:
version: "4.27"
volume_folder: "{{ volume_root_folder }}/diun"
### Uptime monitoring ###
uptime_kuma:
domain: "uptime.{{ base_domain }}"
status_domain: "status.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/uptime_kuma"
pre_deploy_tasks: true
version: "latest"
services_exclude: []
services_include: "{{ services | dict2items | map(attribute='key') | list | difference(services_exclude) }}"

View File

@ -1,43 +0,0 @@
version: '3'
services:
db:
restart: always
image: postgres
networks:
- fider
volumes:
- /var/fider/pg_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: fider
POSTGRES_PASSWORD: "SOMESTRONGPASSWORD"
app:
restart: always
image: getfider/fider:stable
ports:
- "9999:3000"
networks:
- fider
- external_services
environment:
GO_ENV: production
DATABASE_URL: postgres://fider:SOMESTRONGPASSWORD@db:5432/fider?sslmode=disable
JWT_SECRET: LONGRANDOMSTRING
EMAIL_NOREPLY: noreply@data.coop
EMAIL_SMTP_HOST: smtp.fastmail.com
EMAIL_SMTP_PORT: 587
EMAIL_SMTP_USERNAME: a_smtp_user
EMAIL_SMTP_PASSWORD: password_for_smtp_user
VIRTUAL_HOST: feedback.data.coop
LETSENCRYPT_HOST: feedback.data.coop
LETSENCRYPT_EMAIL: valberg@orn.li
depends_on:
- db
networks:
fider:
external_services:
external: true

View File

@ -1,42 +0,0 @@
version: "2.3"
networks:
gitea:
external_services:
external: true
services:
server:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- VIRTUAL_HOST=gitea.local
- VIRTUAL_PORT=3000
restart: always
networks:
- gitea
- external_services
volumes:
- gitea:/data
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: postgres:9.6
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- postgres:/var/lib/postgresql/data
volumes:
gitea:
postgres:

View File

@ -1,38 +0,0 @@
version: '3'
services:
db:
image: postgres
restart: always
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
networks:
- nextcloud
app:
image: nextcloud
volumes:
- nextcloud:/var/www/html
restart: always
environment:
- POSTGRES_HOST=db
- POSTGRES_PASSWORD=hest
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- VIRTUAL_HOST=nextcloud.local
depends_on:
- db
ports:
- "80"
networks:
- nextcloud
- external_services
volumes:
nextcloud:
db:
networks:
external_services:
external: true
nextcloud:

View File

@ -1,49 +0,0 @@
---
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
networks:
- external_services
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: always
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-proxy-le
depends_on:
- nginx-proxy
volumes:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam:ro
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
restart: always
volumes:
conf:
vhost:
html:
dhparam:
certs:
networks:
external_services:
external: true

View File

@ -1,61 +0,0 @@
version: '3'
services:
openldap:
image: osixia/openldap:1.2.2
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "data.coop"
LDAP_DOMAIN: "data.coop"
LDAP_BASE_DN: ""
LDAP_ADMIN_PASSWORD: "admin"
LDAP_CONFIG_PASSWORD: "config"
LDAP_READONLY_USER: "true"
LDAP_READONLY_USER_USERNAME: "readonly"
LDAP_READONLY_USER_PASSWORD: "readonly"
LDAP_RFC2307BIS_SCHEMA: "false"
LDAP_BACKEND: "mdb"
LDAP_TLS: "true"
LDAP_TLS_CRT_FILENAME: "ldap.crt"
LDAP_TLS_KEY_FILENAME: "ldap.key"
LDAP_TLS_CA_CRT_FILENAME: "ca.crt"
LDAP_TLS_ENFORCE: "false"
LDAP_TLS_CIPHER_SUITE: "SECURE256:-VERS-SSL3.0"
LDAP_TLS_PROTOCOL_MIN: "3.1"
LDAP_TLS_VERIFY_CLIENT: "demand"
LDAP_REPLICATION: "false"
KEEP_EXISTING_CONFIG: "false"
LDAP_REMOVE_CONFIG_AFTER_SETUP: "true"
LDAP_SSL_HELPER_PREFIX: "ldap"
tty: true
stdin_open: true
volumes:
- /var/lib/ldap
- /etc/ldap/slapd.d
- /container/service/slapd/assets/certs/
ports:
- "389:389"
- "636:636"
domainname: "ldap.data.coop" # important: same as hostname
hostname: "ldap.data.coop"
networks:
- external_services
phpldapadmin:
image: osixia/phpldapadmin:latest
container_name: phpldapadmin
environment:
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
PHPLDAPADMIN_HTTPS: "false"
PHPLDAPADMIN_TRUST_PROXY_SSL: "true"
VIRTUAL_HOST: ldap.data.coop
LETSENCRYPT_HOST: ldap.data.coop
LETSENCRYPT_EMAIL: valberg@orn.li
depends_on:
- openldap
networks:
- external_services
networks:
external_services:
external: true

View File

@ -1,23 +0,0 @@
version: '3'
services:
thelounge:
image: thelounge/lounge:latest
container_name: thelounge
restart: always
ports:
- "9000:9000"
volumes:
- thelounge:/home/lounge/data # bind lounge config from the host's file system
networks:
- external_services
environment:
VIRTUAL_HOST: irc.data.coop
LETSENCRYPT_HOST: irc.data.coop
LETSENCRYPT_EMAIL: valberg@orn.li
volumes:
thelounge:
networks:
external_services:
external: true

View File

@ -0,0 +1 @@
-c 3500

View File

@ -0,0 +1,20 @@
# DB Version: 14
# OS Type: linux
# DB Type: oltp
# Total Memory (RAM): 16 GB
# Connections num: 300
# Data Storage: hdd
listen_addresses = '*'
max_connections = 300
shared_buffers = 4GB
effective_cache_size = 12GB
maintenance_work_mem = 1GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 4
effective_io_concurrency = 2
work_mem = 6990kB
min_wal_size = 2GB
max_wal_size = 8GB

View File

@ -0,0 +1,37 @@
version: 1
formatters:
precise:
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
filters:
context:
(): synapse.util.logcontext.LoggingContextFilter
request: ""
handlers:
file:
class: logging.handlers.RotatingFileHandler
formatter: precise
filename: /data/homeserver.log
maxBytes: 104857600
backupCount: 10
filters: [context]
encoding: utf8
console:
class: logging.StreamHandler
formatter: precise
filters: [context]
loggers:
synapse:
level: WARN
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
level: INFO
root:
level: INFO
handlers: [file, console]

View File

@ -0,0 +1,154 @@
;<?php http_response_code(403); /*
; config file for PrivateBin
;
; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.
[main]
; (optional) set a project name to be displayed on the website
name = "paste.data.coop"
; enable or disable the discussion feature, defaults to true
discussion = true
; preselect the discussion feature, defaults to false
opendiscussion = false
; enable or disable the password feature, defaults to true
password = true
; enable or disable the file upload feature, defaults to false
fileupload = true
; preselect the burn-after-reading feature, defaults to false
burnafterreadingselected = false
; which display mode to preselect by default, defaults to "plaintext"
; make sure the value exists in [formatter_options]
defaultformatter = "plaintext"
; (optional) set a syntax highlighting theme, as found in css/prettify/
; syntaxhighlightingtheme = "sons-of-obsidian"
; size limit per paste or comment in bytes, defaults to 2 Mebibytes
sizelimit = 2097152
; template to include, default is "bootstrap" (tpl/bootstrap.php)
template = "bootstrap"
; (optional) notice to display
; notice = "Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service."
; by default PrivateBin will guess the visitors language based on the browsers
; settings. Optionally you can enable the language selection menu, which uses
; a session cookie to store the choice until the browser is closed.
languageselection = false
; set the language your installs defaults to, defaults to English
; if this is set and language selection is disabled, this will be the only language
; languagedefault = "en"
; (optional) URL shortener address to offer after a new paste is created
; it is suggested to only use this with self-hosted shorteners as this will leak
; the pastes encryption key
; urlshortener = "https://shortener.example.com/api?link="
; (optional) Let users create a QR code for sharing the paste URL with one click.
; It works both when a new paste is created and when you view a paste.
; qrcode = true
; (optional) IP based icons are a weak mechanism to detect if a comment was from
; a different user when the same username was used in a comment. It might be
; used to get the IP of a non anonymous comment poster if the server salt is
; leaked and a SHA256 HMAC rainbow table is generated for all (relevant) IPs.
; Can be set to one these values: none / vizhash / identicon (default).
; icon = none
; Content Security Policy headers allow a website to restrict what sources are
; allowed to be accessed in its context. You need to change this if you added
; custom scripts from third-party domains to your templates, e.g. tracking
; scripts or run your site behind certain DDoS-protection services.
; Check the documentation at https://content-security-policy.com/
; Note: If you use a bootstrap theme, you can remove the allow-popups from the sandbox restrictions.
; By default this disallows to load images from third-party servers, e.g. when they are embedded in pastes. If you wish to allow that, you can adjust the policy here. See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-not-it-load-embedded-images for details.
; cspheader = "default-src 'none'; manifest-src 'self'; connect-src *; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:; media-src data:; object-src data:; Referrer-Policy: 'no-referrer'; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals"
; stay compatible with PrivateBin Alpha 0.19, less secure
; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
; sha256 in HMAC for the deletion token
zerobincompatibility = false
[expire]
; expire value that is selected per default
; make sure the value exists in [expire_options]
default = "1day"
[expire_options]
; Set each one of these to the number of seconds in the expiration period,
; or 0 if it should never expire
5min = 300
10min = 600
1hour = 3600
1day = 86400
1week = 604800
; Well this is not *exactly* one month, it's 30 days:
1month = 2592000
1year = 31536000
never = 0
[formatter_options]
; Set available formatters, their order and their labels
plaintext = "Plain Text"
syntaxhighlighting = "Source Code"
markdown = "Markdown"
[traffic]
; time limit between calls from the same IP address in seconds
; Set this to 0 to disable rate limiting.
limit = 10
; (optional) if your website runs behind a reverse proxy or load balancer,
; set the HTTP header containing the visitors IP address, i.e. X_FORWARDED_FOR
header = "X_FORWARDED_FOR"
; directory to store the traffic limits in
dir = PATH "data"
[purge]
; minimum time limit between two purgings of expired pastes, it is only
; triggered when pastes are created
; Set this to 0 to run a purge every time a paste is created.
limit = 300
; maximum amount of expired pastes to delete in one purge
; Set this to 0 to disable purging. Set it higher, if you are running a large
; site
batchsize = 10
; directory to store the purge limit in
dir = PATH "data"
[model]
; name of data model class to load and directory for storage
; the default model "Filesystem" stores everything in the filesystem
class = Filesystem
[model_options]
dir = PATH "data"
;[model]
; example of DB configuration for MySQL
;class = Database
;[model_options]
;dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8"
;tbl = "privatebin_" ; table prefix
;usr = "privatebin"
;pwd = "Z3r0P4ss"
;opt[12] = true ; PDO::ATTR_PERSISTENT
;[model]
; example of DB configuration for SQLite
;class = Database
;[model_options]
;dsn = "sqlite:" PATH "data/db.sq3"
;usr = null
;pwd = null
;opt[12] = true ; PDO::ATTR_PERSISTENT

View File

@ -0,0 +1 @@
MIICszCCAZsCBgF8WpKKwTANBgkqhkiG9w0BAQsFADAdMRswGQYDVQQDDBJkYXRhLmNvb3Agc2VydmljZXMwHhcNMjExMDA3MTE0MzQ1WhcNMzExMDA3MTE0NTI1WjAdMRswGQYDVQQDDBJkYXRhLmNvb3Agc2VydmljZXMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCdV0stfU8aA1bi+GYd/a5DOyoox01BgzWwBFqVjlo80frsOsH8g814eDuMuff/UJy+2YxaozYQGxP+DcOVXi+0Fts9zjRj6wa6HCQqiR/SNUa69fGHcyAo2Tr0faxOyf3QMBqIngTRZB99quNMuAM96RCg25LtDaaWjNVxdHlj78+kU1bQXExp0ZfELlKGtllWP07cyz4nGfZmuK1AiWSsRbDIbyK5dvzw/pMS1kexh6ylnQu1iLqD3vYZBUDX9lPNkavTYZNCEL4ElUvR81S0ko2zkYAUiuVTtTUKucc98dTRhkuV4YCiiW6UQGY/jzmXYBfpzAY3n5eH5iUu/tRXAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFQc8ytexKiXOIGrSYYtFaF/lxv8AwMgsndv8YxJ+x/cUwN9tdmA8IAZDIS13qBrCOdZE4pJ/09VkYdErcpbtV7PWC3LDv/c2qakyiBUYZj4WgJio+oD0GCqXsby3aqJeVt9cJr4gSsXxn1c+7GV7p/gc/2FFmlWcqMN/2F7LvFvObu55QlppWZrn8kreaUQmRuTTIviFQRmvrmwKyK52LEcK7qoh/v1aHyYDl91gu3nLMEluz6hy3UEPYgpdH1t2C7K0Kjri25pJNGCFrpKjWWveteKazUeDd4adHMiw2MVfeEyTCXEFoaxQS9QmbmhSMRhiHjbdffL7xi//aSh1bo=

View File

@ -0,0 +1,14 @@
location /_matrix {
proxy_pass http://0.0.0.0:8008;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /.well-known/matrix/server {
default_type application/json;
return 200 '{"m.server": "matrix.data.coop:443"}';
}
location /.well-known/matrix/client {
default_type application/json;
return 200 '{"m.homeserver": {"base_url": "https://matrix.data.coop"}}';
}

View File

@ -0,0 +1 @@
client_max_body_size 10G;

View File

@ -0,0 +1 @@
client_max_body_size 1G; # default is 1M

View File

@ -0,0 +1,2 @@
listen 3000;
client_max_body_size 50M; # default is 1M

View File

@ -0,0 +1,2 @@
listen 8008;
client_max_body_size 1G; # default is 1M

View File

@ -0,0 +1 @@
client_max_body_size 1G; # default is 1M

View File

@ -0,0 +1,4 @@
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;

View File

@ -0,0 +1,2 @@
server_name www.data.coop;
return 301 $scheme://data.coop$request_uri;

View File

@ -0,0 +1,6 @@
# vim: ft=yaml.ansible
---
- name: restart nginx
command: docker compose restart proxy
args:
chdir: "{{ services.nginx_proxy.volume_folder }}"

View File

@ -0,0 +1,26 @@
# vim: ft=yaml.ansible
---
- name: Create volume folder for service {{ service.name }}
file:
name: "{{ service.vars.volume_folder }}"
state: directory
- name: Upload Compose file for service {{ service.name }}
template:
src: compose-files/{{ service.name }}.yml.j2
dest: "{{ service.vars.volume_folder }}/docker-compose.yml"
owner: root
mode: u=rw,go=
- name: Run pre-deployment tasks for service {{ service.name }}
include_tasks: pre_deploy/{{ service.name }}.yml
when: service.vars.pre_deploy_tasks is defined and service.vars.pre_deploy_tasks
- name: Deploy Compose stack for service {{ service.name }}
command: docker compose up -d --remove-orphans --pull always
args:
chdir: "{{ service.vars.volume_folder }}"
- name: Run post-deployment tasks for service {{ service.name }}
include_tasks: post_deploy/{{ service.name }}.yml
when: service.vars.post_deploy_tasks is defined and service.vars.post_deploy_tasks

View File

@ -1,28 +1,44 @@
# vim: ft=yaml.ansible
---
- name: add docker gpg key
- name: Add Docker PGP key
apt_key:
keyserver: pgp.key-server.io
keyserver: pgp.mit.edu
id: 8D81803C0EBFCD88
state: present
- name: add docker apt repository
- name: Add Docker apt repository
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu artful stable
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
update_cache: yes
- name: install docker-ce
- name: Install Docker
apt:
name: docker-ce
name: "{{ pkgs }}"
state: present
vars:
pkgs:
- docker-ce
- docker-compose-plugin
- name: Configure cron job to prune unused Docker data weekly
cron:
name: Prune unused Docker data
cron_file: ansible_docker_prune
job: 'docker system prune -fa && docker volume prune -fa'
special_time: weekly
user: root
state: present
- name: install docker python bindings
pip:
executable: "pip3"
name: "docker-compose"
state: present
- name: Create folder structure for bind mounts
file:
name: "{{ item }}"
state: directory
loop:
- "{{ volume_root_folder }}"
- "{{ volume_website_folder }}"
- name: setup services
- name: Set up services
import_tasks: services.yml
tags:
- setup_services

View File

@ -0,0 +1,13 @@
# vim: ft=yaml.ansible
---
- name: Generate htpasswd file
shell: docker compose exec registry htpasswd -Bbn docker {{ docker_password }} > auth/htpasswd
args:
chdir: "{{ services.docker_registry.volume_folder }}"
creates: "{{ services.docker_registry.volume_folder }}/auth/htpasswd"
- name: log in to registry
docker_login:
registry: "{{ 'docker.data.coop' if vagrant else services.docker_registry.domain }}"
username: docker
password: "{{ docker_password }}"

View File

@ -0,0 +1,19 @@
# vim: ft=yaml.ansible
---
- name: Configure cron job to remove old Mastodon media daily
cron:
name: Clean Mastodon media data older than a week
cron_file: ansible_mastodon_clean_media
job: docker exec mastodon-web-1 tootctl media remove --days 7
special_time: daily
user: root
state: present
- name: Configure cron job to remove old Mastodon preview cards daily
cron:
name: Clean Mastodon preview card data older than two weeks
cron_file: ansible_mastodon_clean_preview_cards
job: docker exec mastodon-web-1 tootctl preview_cards remove --days 14
special_time: daily
user: root
state: present

View File

@ -0,0 +1,11 @@
# vim: ft=yaml.ansible
---
- name: Upload vhost config for root domain
copy:
src: vhost/base_domain
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.domain }}"
- name: Upload vhost config for WWW domain
copy:
src: vhost/www.base_domain
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.data_coop_website.www_domain }}"

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
path: "{{ services.docker_registry.volume_folder }}/{{ volume }}"
state: directory
loop:
- auth
- registry
loop_control:
loop_var: volume
- name: Copy docker registry vhost configuration
copy:
src: vhost/docker_registry
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.docker_registry.domain }}"
mode: "0644"

View File

@ -0,0 +1,21 @@
# vim: ft=yaml.ansible
---
- name: Create subfolder
file:
name: "{{ services.element.volume_folder }}/data"
state: directory
- name: Upload config.json
template:
src: element/config.json.j2
dest: "{{ services.element.volume_folder }}/data/config.json"
- name: Upload riot.im.conf
copy:
src: element/riot.im.conf
dest: "{{ services.element.volume_folder }}/data/riot.im.conf"
- name: Upload vhost config for Element domain
copy:
src: vhost/element
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.element.domain }}"

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.hedgedoc.volume_folder }}/{{ volume }}"
state: directory
loop:
- db
- hedgedoc/uploads
loop_control:
loop_var: volume
- name: Copy SSO certificate
copy:
src: sso/sso.data.coop.pem
dest: "{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem"
mode: "0644"

View File

@ -0,0 +1,45 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.mailu.volume_folder }}/{{ volume }}"
state: directory
loop:
- redis
- certs
- data
- dkim
- mail
- mailqueue
- filter
- postgres
- webmail
- overrides
- overrides/nginx
- overrides/dovecot
- overrides/postfix
- overrides/rspamd
- overrides/snappymail
loop_control:
loop_var: volume
- name: Upload mailu.env file
template:
src: mailu/env.j2
dest: "{{ services.mailu.volume_folder }}/mailu.env"
- name: Hard link to Let's Encrypt TLS certificate
file:
src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/fullchain.pem"
dest: "{{ services.mailu.volume_folder }}/certs/cert.pem"
state: hard
force: true
when: letsencrypt_enabled
- name: Hard link to Let's Encrypt TLS key
file:
src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/key.pem"
dest: "{{ services.mailu.volume_folder }}/certs/key.pem"
state: hard
force: true
when: letsencrypt_enabled

View File

@ -0,0 +1,45 @@
# vim: ft=yaml.ansible
---
- name: Create subfolder for Mastodon data
file:
name: "{{ services.mastodon.volume_folder }}/mastodon_data"
state: directory
owner: "991"
mode: u=rwx,g=rx,o=rx
- name: Create subfolder for PostgreSQL data
file:
name: "{{ services.mastodon.volume_folder }}/postgres_data"
state: directory
owner: "70"
mode: u=rwx,go=
- name: Create subfolder for PostgreSQL config
file:
name: "{{ services.mastodon.volume_folder }}/postgres_config"
state: directory
owner: root
mode: u=rwx,g=rx,o=rx
- name: Create subfolder for Redis data
file:
name: "{{ services.mastodon.volume_folder }}/redis_data"
state: directory
owner: "999"
group: "1000"
mode: u=rwx,g=rx,o=rx
- name: Upload mastodon.env file
template:
src: mastodon/env.j2
dest: "{{ services.mastodon.volume_folder }}/mastodon.env"
- name: Upload vhost config for Mastodon domain
copy:
src: vhost/mastodon
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.mastodon.domain }}"
- name: Upload PostgreSQL config
copy:
src: mastodon/postgresql.conf
dest: "{{ services.mastodon.volume_folder }}/postgres_config/postgresql.conf"

View File

@ -0,0 +1,34 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.matrix.volume_folder }}/{{ volume }}"
state: directory
owner: "991"
group: "991"
loop:
- data
- data/uploads
- data/media
loop_control:
loop_var: volume
- name: Create Matrix DB subfolder
file:
name: "{{ services.matrix.volume_folder }}/db"
state: directory
- name: Upload vhost config for Matrix domain
copy:
src: vhost/matrix
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.matrix.domain }}"
- name: Upload homeserver.yaml
template:
src: matrix/homeserver.yaml.j2
dest: "{{ services.matrix.volume_folder }}/data/homeserver.yaml"
- name: Upload Matrix logging config
copy:
src: matrix/log.config
dest: "{{ services.matrix.volume_folder }}/data/matrix.data.coop.log.config"

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
path: "{{ services.nextcloud.volume_folder }}/{{ volume }}"
state: directory
loop:
- app
- postgres
loop_control:
loop_var: volume
- name: Upload vhost config for Nextcloud domain
copy:
src: vhost/nextcloud
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.nextcloud.domain }}"
notify: "restart nginx"

View File

@ -0,0 +1,14 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.nginx_proxy.volume_folder }}/{{ volume }}"
state: directory
loop:
- conf
- vhost
- html
- dhparam
- certs
loop_control:
loop_var: volume

View File

@ -0,0 +1,12 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.openldap.volume_folder }}/{{ volume }}"
state: directory
loop:
- var/lib/ldap
- etc/slapd
- certs
loop_control:
loop_var: volume

View File

@ -0,0 +1,13 @@
# vim: ft=yaml.ansible
---
- name: Set up network for Postfix
docker_network:
name: postfix
ipam_config:
- subnet: '172.16.0.0/16'
gateway: 172.16.0.1
- name: Create subfolder
file:
name: "{{ services.postfix.volume_folder }}/dkim"
state: directory

View File

@ -0,0 +1,16 @@
# vim: ft=yaml.ansible
---
- name: Create subfolders
file:
name: "{{ services.privatebin.volume_folder }}/{{ volume }}"
state: directory
loop:
- cfg
- data
loop_control:
loop_var: volume
- name: Upload PrivateBin config
copy:
src: privatebin/conf.php
dest: "{{ services.privatebin.volume_folder }}/cfg/conf.php"

View File

@ -0,0 +1,11 @@
# vim: ft=yaml.ansible
---
- name: Create subfolder
file:
name: "{{ services.rallly.volume_folder }}/postgres"
state: directory
- name: Copy rallly.env file
template:
src: rallly/env.j2
dest: "{{ services.rallly.volume_folder }}/rallly.env"

View File

@ -0,0 +1,72 @@
# vim: ft=yaml.ansible
---
- name: Create SSH directory
file:
path: "{{ services.restic.volume_folder }}/ssh"
owner: root
group: root
mode: '0755'
state: directory
- name: Upload private SSH key
copy:
dest: "{{ services.restic.volume_folder }}/ssh/id_ed25519"
owner: root
group: root
mode: '0600'
content: "{{ restic_secrets.ssh_privkey }}"
- name: Derive public SSH key
shell: >-
ssh-keygen -f {{ services.restic.volume_folder }}/ssh/id_ed25519 -y
> {{ services.restic.volume_folder }}/ssh/id_ed25519.pub
args:
creates: "{{ services.restic.volume_folder }}/ssh/id_ed25519.pub"
- name: Set file permissions on public SSH key
file:
path: "{{ services.restic.volume_folder }}/ssh/id_ed25519.pub"
owner: root
group: root
mode: '0644'
state: touch
- name: Upload SSH config
template:
src: restic/ssh.config.j2
dest: "{{ services.restic.volume_folder }}/ssh/config"
owner: root
group: root
mode: '0600'
- name: Upload SSH known_hosts file
template:
src: restic/ssh.known_hosts.j2
dest: "{{ services.restic.volume_folder }}/ssh/known_hosts"
owner: root
group: root
mode: '0600'
- name: Create scripts directory
file:
path: "{{ services.restic.volume_folder }}/scripts"
owner: root
group: root
mode: '0755'
state: directory
- name: Upload failure.sh script
template:
src: restic/failure.sh.j2
dest: "{{ services.restic.volume_folder }}/scripts/failure.sh"
owner: root
group: root
mode: '0755'
- name: Upload success.sh script
template:
src: restic/success.sh.j2
dest: "{{ services.restic.volume_folder }}/scripts/success.sh"
owner: root
group: root
mode: '0755'

View File

@ -0,0 +1,9 @@
- name: Upload vhost config for uptime domain
copy:
src: vhost/uptime_kuma
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.uptime_kuma.domain }}_location"
- name: Upload vhost config for status domain
copy:
src: vhost/uptime_kuma
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.uptime_kuma.status_domain }}_location"

View File

@ -0,0 +1,20 @@
# vim: ft=yaml.ansible
---
- name: Create subfolder for MariaDB data
file:
name: "{{ services.writefreely.volume_folder }}/db"
owner: "999"
group: "999"
state: directory
- name: Create subfolder for encryption keys
file:
name: "{{ services.writefreely.volume_folder }}/keys"
owner: "2"
group: "2"
state: directory
- name: Upload config.ini
template:
src: "writefreely/config.ini.j2"
dest: "{{ services.writefreely.volume_folder }}/config.ini"

View File

@ -1,11 +1,28 @@
# vim: ft=yaml.ansible
---
- name: setup external services network
- name: Set up external services network
docker_network:
name: external_services
- name: setup services
docker_service:
project_name: "{{ item }}"
definition:
"{{ lookup('file', 'composefiles/{{ item }}.yml') | from_yaml }}"
with_items: "{{ services }}"
- name: Deploy all services
include_tasks:
file: block.yml
vars:
service:
name: "{{ item }}"
vars: "{{ services[item] }}"
loop: "{{ services_include }}"
when: single_service is not defined and
(item.vars.disabled_in_vagrant is not defined or
not (item.vars.disabled_in_vagrant and vagrant))
- name: Deploy single service
include_tasks:
file: block.yml
vars:
service:
name: "{{ single_service }}"
vars: "{{ services[single_service] }}"
when: single_service is defined and single_service in services and
(services[single_service].disabled_in_vagrant is not defined or
not (services[single_service].disabled_in_vagrant and vagrant))

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: docker.data.coop/cryptoaarhus-website
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST : "{{ services.cryptoaarhus_website.domains | join(',') }}"
LETSENCRYPT_HOST: "{{ services.cryptoaarhus_website.domains | join(',') }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: docker.data.coop/cryptohagen-website
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST : "{{ services.cryptohagen_website.domains | join(',') }}"
LETSENCRYPT_HOST: "{{ services.cryptohagen_website.domains | join(',') }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,27 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
prod-web:
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.version }}
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
LETSENCRYPT_HOST: "{{ services.data_coop_website.domain }},{{ services.data_coop_website.www_domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
staging-web:
image: docker.data.coop/data-coop-website:{{ services.data_coop_website.staging_version }}
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.data_coop_website.staging_domain }}"
LETSENCRYPT_HOST: "{{ services.data_coop_website.staging_domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,21 @@
# vim: ft=yaml.ansible
---
version: "3.5"
services:
diun:
image: "ghcr.io/crazy-max/diun:{{ services.diun.version }}"
command: serve
volumes:
- "./data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "TZ=Europe/Paris"
- "DIUN_WATCH_WORKERS=20"
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
- "DIUN_WATCH_JITTER=30s"
- "DIUN_PROVIDERS_DOCKER=true"
- "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
labels:
- "diun.enable=true"
restart: always

View File

@ -0,0 +1,23 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: registry:{{ services.docker_registry.version }}
restart: always
networks:
- external_services
volumes:
- "./registry:/var/lib/registry"
- "./auth:/auth"
environment:
VIRTUAL_HOST: "{{ services.docker_registry.domain }}"
LETSENCRYPT_HOST: "{{ services.docker_registry.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
REGISTRY_AUTH: "htpasswd"
REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd"
REGISTRY_AUTH_HTPASSWD_REALM: "data.coop docker registry"
networks:
external_services:
external: true

View File

@ -0,0 +1,40 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: drone/drone:{{ services.drone.version }}
restart: unless-stopped
networks:
- default
- external_services
volumes:
- ".:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DRONE_GITEA_SERVER: https://{{ services.forgejo.domain }}
DRONE_GITEA_CLIENT_ID: "{{ drone_secrets.oauth_client_id }}"
DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}"
DRONE_GIT_ALWAYS_AUTH: true
DRONE_SERVER_HOST: "{{ services.drone.domain }}"
DRONE_SERVER_PROTO: https
DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}"
VIRTUAL_HOST: "{{ services.drone.domain }}"
LETSENCRYPT_HOST: "{{ services.drone.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
runner:
image: drone/drone-runner-docker:{{ services.drone.version }}
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DRONE_RPC_HOST: "{{ services.drone.domain }}"
DRONE_RPC_PROTO: https
DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}"
DRONE_RUNNER_CAPACITY: 2
DRONE_RUNNER_NAME: data.coop_drone_runner
networks:
external_services:
external: true

View File

@ -0,0 +1,22 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: avhost/docker-matrix-element:{{ services.element.version }}
restart: unless-stopped
networks:
- external_services
expose:
- "8080"
volumes:
- "./data:/data"
environment:
VIRTUAL_HOST: "{{ services.element.domain }}"
VIRTUAL_PORT: "8080"
LETSENCRYPT_HOST: "{{ services.element.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,22 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: docker.data.coop/unipi:{{ services.fedi_dk_website.version }}
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.fedi_dk_website.domain }}"
LETSENCRYPT_HOST: "{{ services.fedi_dk_website.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
command: --remote=https://git.data.coop/fedi.dk/website.git#main
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun"
networks:
external_services:
external: true

View File

@ -0,0 +1,38 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: codeberg.org/forgejo/forgejo:{{ services.forgejo.version }}
restart: unless-stopped
networks:
- external_services
- postfix
volumes:
- ".:/data"
ports:
- "22:22"
environment:
VIRTUAL_HOST: "{{ services.forgejo.domain }}"
VIRTUAL_PORT: "3000"
LETSENCRYPT_HOST: "{{ services.forgejo.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
# Forgejo customization, see: https://docs.gitea.io/en-us/install-with-docker/#customization
# https://docs.gitea.io/en-us/config-cheat-sheet/#security-security
FORGEJO__mailer__ENABLED: true
FORGEJO__mailer__FROM: noreply@{{ services.forgejo.domain }}
FORGEJO__mailer__PROTOCOL: smtp
FORGEJO__mailer__SMTP_ADDR: "{{ smtp_host }}"
FORGEJO__mailer__SMTP_PORT: "{{ smtp_port }}"
FORGEJO__security__LOGIN_REMEMBER_DAYS: "60"
FORGEJO__security__PASSWORD_COMPLEXITY: off
FORGEJO__security__MIN_PASSWORD_LENGTH: "8"
FORGEJO__security__PASSWORD_CHECK_PWN: true
FORGEJO__service__ENABLE_NOTIFY_MAIL: true
FORGEJO__service__REGISTER_EMAIL_CONFIRM: true
networks:
external_services:
external: true
postfix:
external: true

View File

@ -0,0 +1,44 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
db:
image: postgres:{{ services.hedgedoc.postgres_version }}
restart: unless-stopped
volumes:
- "./db:/var/lib/postgresql/data"
environment:
POSTGRES_USER: codimd
POSTGRES_PASSWORD: "{{ postgres_passwords.hedgedoc }}"
POSTGRES_DB: codimd
app:
image: quay.io/hedgedoc/hedgedoc:{{ services.hedgedoc.version }}
volumes:
- "./hedgedoc/uploads:/hedgedoc/public/uploads"
- "./sso.data.coop.pem:/sso.data.coop.pem"
restart: unless-stopped
networks:
- default
- external_services
environment:
CMD_DB_URL: postgres://codimd:{{ postgres_passwords.hedgedoc }}@db:5432/codimd
CMD_DOMAIN: "{{ services.hedgedoc.domain }}"
CMD_ALLOW_EMAIL_REGISTER: False
CMD_IMAGE_UPLOAD_TYPE: filesystem
CMD_EMAIL: False
CMD_SAML_IDPCERT: /sso.data.coop.pem
CMD_SAML_IDPSSOURL: https://{{ services.keycloak.domain }}/auth/realms/datacoop/protocol/saml
CMD_SAML_ISSUER: hedgedoc
CMD_SAML_IDENTIFIERFORMAT: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
CMD_USECDN: false
CMD_PROTOCOL_USESSL: true
VIRTUAL_HOST: "{{ services.hedgedoc.domain }}"
LETSENCRYPT_HOST: "{{ services.hedgedoc.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
depends_on:
- db
networks:
external_services:
external: true

View File

@ -0,0 +1,42 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
db:
image: postgres:{{ services.keycloak.postgres_version }}
restart: unless-stopped
volumes:
- "./data:/var/lib/postgresql/data"
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: "{{ postgres_passwords.keycloak }}"
POSTGRES_DB: keycloak
app:
image: quay.io/keycloak/keycloak:{{ services.keycloak.version }}
restart: unless-stopped
networks:
- default
- postfix
- external_services
command:
- "start"
- "--db=postgres"
- "--db-url=jdbc:postgresql://db:5432/keycloak"
- "--db-username=keycloak"
- "--db-password={{ postgres_passwords.keycloak }}"
- "--hostname={{ services.keycloak.domain }}"
- "--proxy=edge"
- "--https-port=8080"
- "--http-relative-path=/auth"
environment:
VIRTUAL_HOST: "{{ services.keycloak.domain }}"
VIRTUAL_PORT: "8080"
LETSENCRYPT_HOST: "{{ services.keycloak.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
postfix:
external: true
external_services:
external: true

View File

@ -0,0 +1,146 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
postgres:
image: postgres:{{ services.mailu.postgres_version }}
restart: unless-stopped
environment:
POSTGRES_DB: mailu
POSTGRES_USER: mailu
POSTGRES_PASSWORD: "{{ postgres_passwords.mailu }}"
volumes:
- "./postgres:/var/lib/postgresql/data"
dns:
- "{{ services.mailu.dns }}"
redis:
image: redis:{{ services.mailu.redis_version }}
restart: unless-stopped
volumes:
- "./redis:/data"
depends_on:
- resolver
dns:
- "{{ services.mailu.dns }}"
front:
image: ghcr.io/mailu/nginx:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
environment:
VIRTUAL_HOST: "{{ services.mailu.domain }}"
LETSENCRYPT_HOST: "{{ services.mailu.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
volumes:
- "./certs:/certs"
- "./overrides/nginx:/overrides:ro"
expose:
- "80"
ports:
- "25:25"
- "465:465"
- "587:587"
- "110:110"
- "995:995"
- "143:143"
- "993:993"
networks:
- default
- webmail
- external_services
depends_on:
- resolver
dns:
- "{{ services.mailu.dns }}"
resolver:
image: ghcr.io/mailu/unbound:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
networks:
default:
ipv4_address: "{{ services.mailu.dns }}"
admin:
image: ghcr.io/mailu/admin:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
volumes:
- "./data:/data"
- "./dkim:/dkim"
networks:
default:
aliases:
- admin.mailu
depends_on:
- redis
- resolver
dns:
- "{{ services.mailu.dns }}"
imap:
image: ghcr.io/mailu/dovecot:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
volumes:
- "./mail:/mail"
- "./overrides/dovecot:/overrides:ro"
depends_on:
- front
- resolver
dns:
- "{{ services.mailu.dns }}"
smtp:
image: ghcr.io/mailu/postfix:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
volumes:
- "./mailqueue:/queue"
- "./overrides/postfix:/overrides:ro"
depends_on:
- front
- resolver
dns:
- "{{ services.mailu.dns }}"
antispam:
image: ghcr.io/mailu/rspamd:{{ services.mailu.version }}
hostname: antispam
restart: unless-stopped
env_file: mailu.env
volumes:
- "./filter:/var/lib/rspamd"
- "./overrides/rspamd:/overrides:ro"
depends_on:
- front
- redis
- resolver
dns:
- "{{ services.mailu.dns }}"
webmail:
image: ghcr.io/mailu/webmail:{{ services.mailu.version }}
restart: unless-stopped
env_file: mailu.env
volumes:
- "./webmail:/data"
- "./overrides/snappymail:/overrides:ro"
networks:
- webmail
depends_on:
- front
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: "{{ services.mailu.subnet }}"
webmail:
driver: bridge
external_services:
external: true

View File

@ -0,0 +1,146 @@
# vim: ft=yaml.docker-compose
x-sidekiq: &sidekiq
image: tootsuite/mastodon:{{ services.mastodon.version }}
restart: always
env_file: mastodon.env
networks:
- default
- postfix
- external_services
volumes:
- "./mastodon_data:/mastodon/public/system"
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
version: "3.8"
services:
db:
restart: always
image: postgres:{{ services.mastodon.postgres_version }}
shm_size: 256mb
volumes:
- "./postgres_data:/var/lib/postgresql/data"
- "./postgres_config:/config:ro"
command: postgres -c config_file=/config/postgresql.conf
environment:
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
redis:
restart: always
image: redis:{{ services.mastodon.redis_version }}
volumes:
- "./redis_data:/data"
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
web:
image: tootsuite/mastodon:{{ services.mastodon.version }}
restart: always
env_file: mastodon.env
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks:
- default
- external_services
volumes:
- "./mastodon_data:/mastodon/public/system"
environment:
MAX_THREADS: 10
WEB_CONCURRENCY: 3
VIRTUAL_HOST: "{{ services.mastodon.domain }}"
VIRTUAL_PORT: "3000"
VIRTUAL_PATH: /
LETSENCRYPT_HOST: "{{ services.mastodon.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
healthcheck:
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
streaming:
image: tootsuite/mastodon:{{ services.mastodon.version }}
restart: always
env_file: mastodon.env
command: node ./streaming
networks:
- default
- external_services
ports:
- "127.0.0.1:4000:4000"
environment:
DB_POOL: 15
VIRTUAL_HOST: "{{ services.mastodon.domain }}"
VIRTUAL_PORT: "4000"
VIRTUAL_PATH: "/api/v1/streaming"
healthcheck:
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# sidekiq-default-push-pull: DB_POOL = 25, -c 25 for 25 connections
sidekiq-default-push-pull:
<<: *sidekiq
command: bundle exec sidekiq -c 25 -q default -q push -q pull
environment:
DB_POOL: 25
# sidekiq-default-pull-push: DB_POOL = 25, -c 25 for 25 connections
sidekiq-default-pull-push:
<<: *sidekiq
command: bundle exec sidekiq -c 25 -q default -q pull -q push
environment:
DB_POOL: 25
# sidekiq-pull-default-push: DB_POOL = 25, -c 25 for 25 connections
sidekiq-pull-default-push:
<<: *sidekiq
command: bundle exec sidekiq -c 25 -q pull -q default -q push
environment:
DB_POOL: 25
# sidekiq-push-default-pull: DB_POOL = 25, -c 25 for 25 connections
sidekiq-push-default-pull:
<<: *sidekiq
command: bundle exec sidekiq -c 25 -q push -q default -q pull
environment:
DB_POOL: 25
# sidekiq-push-scheduler: DB_POOL = 5, -c 5 for 5 connections
sidekiq-push-scheduler:
<<: *sidekiq
command: bundle exec sidekiq -c 5 -q push -q scheduler
environment:
DB_POOL: 5
# sidekiq-push-mailers: DB_POOL = 5, -c 5 for 5 connections
sidekiq-push-mailers:
<<: *sidekiq
command: bundle exec sidekiq -c 5 -q push -q mailers
environment:
DB_POOL: 5
# sidekiq-push-ingress: DB_POOL = 10, -c 10 for 10 connections
sidekiq-push-ingress:
<<: *sidekiq
command: bundle exec sidekiq -c 10 -q push -q ingress
environment:
DB_POOL: 10
networks:
external_services:
external: true
postfix:
external: true

View File

@ -0,0 +1,36 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
postgres:
image: postgres:{{ services.matrix.postgres_version }}
restart: unless-stopped
volumes:
- "./db:/var/lib/postgresql/data"
environment:
POSTGRES_USER: synapse
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
synapse:
image: matrixdotorg/synapse:{{ services.matrix.version }}
restart: unless-stopped
networks:
- default
- external_services
- postfix
volumes:
- "./data:/data"
environment:
SYNAPSE_CONFIG_PATH: /data/homeserver.yaml
SYNAPSE_CACHE_FACTOR: "2"
SYNAPSE_LOG_LEVEL: INFO
VIRTUAL_HOST: "{{ services.matrix.domain }}"
VIRTUAL_PORT: "8008"
LETSENCRYPT_HOST: "{{ services.matrix.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true
postfix:
external: true

View File

@ -0,0 +1,44 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: docker.data.coop/membersystem:{{ services.membersystem.version }}
restart: always
user: "$UID:$GID"
tty: true
networks:
- default
- external_services
- postfix
environment:
SECRET_KEY: "{{ membersystem_secrets.secret_key }}"
DATABASE_URL: postgres://postgres:{{ postgres_passwords.membersystem }}@postgres:5432/postgres
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_URL: smtp://noop@{{ smtp_host }}:{{ smtp_port }}
VIRTUAL_HOST: "{{ services.membersystem.domain }}"
VIRTUAL_PORT: "8000"
LETSENCRYPT_HOST: "{{ services.membersystem.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
ALLOWED_HOSTS: "{{ services.membersystem.domain }}"
CSRF_TRUSTED_ORIGINS: https://{{ services.membersystem.domain }}
DJANGO_ADMINS: "{{ services.membersystem.django_admins }}"
DEFAULT_FROM_EMAIL: noreply@{{ services.membersystem.domain }}
depends_on:
- postgres
postgres:
image: postgres:{{ services.membersystem.postgres_version }}
restart: always
volumes:
- "./postgres/data:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: "{{ postgres_passwords.membersystem }}"
networks:
external_services:
external: true
postfix:
external: true

View File

@ -0,0 +1,36 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: netdata/netdata:{{ services.netdata.version }}
restart: unless-stopped
hostname: hevonen.servers.{{ base_domain }}
volumes:
- "/proc:/host/proc:ro"
- "/sys:/host/sys:ro"
- "/etc/os-release:/host/etc/os-release:ro"
networks:
- default
- external_services
environment:
VIRTUAL_HOST : "{{ services.netdata.domain }}"
LETSENCRYPT_HOST: "{{ services.netdata.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
PGID: "999"
DOCKER_HOST: "socket_proxy:2375"
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
socket-proxy:
image: tecnativa/docker-socket-proxy:latest
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
environment:
CONTAINERS: 1
networks:
external_services:
external: true

View File

@ -0,0 +1,59 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
postgres:
image: postgres:{{ services.nextcloud.postgres_version }}
restart: unless-stopped
volumes:
- "./postgres:/var/lib/postgresql/data"
environment:
POSTGRES_DB: nextcloud
POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}"
POSTGRES_USER: nextcloud
redis:
image: redis:{{ services.nextcloud.redis_version }}
restart: unless-stopped
command: redis-server --requirepass {{ nextcloud_secrets.redis_password }}
tmpfs:
- /var/lib/redis
cron:
image: nextcloud:{{ services.nextcloud.version }}
restart: unless-stopped
entrypoint: /cron.sh
volumes:
- "./app:/var/www/html"
depends_on:
- postgres
- redis
app:
image: nextcloud:{{ services.nextcloud.version }}
restart: unless-stopped
networks:
- default
- postfix
- external_services
volumes:
- "./app:/var/www/html"
environment:
VIRTUAL_HOST: "{{ services.nextcloud.domain }}"
LETSENCRYPT_HOST: "{{ services.nextcloud.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
POSTGRES_HOST: postgres
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}"
REDIS_HOST: redis
REDIS_HOST_PASSWORD: "{{ nextcloud_secrets.redis_password }}"
depends_on:
- postgres
- redis
networks:
postfix:
external: true
external_services:
external: true

View File

@ -0,0 +1,38 @@
version: "3.8"
services:
proxy:
image: nginxproxy/nginx-proxy:{{ services.nginx_proxy.version }}
restart: always
networks:
- external_services
ports:
- "80:80"
- "443:443"
volumes:
- "./conf:/etc/nginx/conf.d"
- "./vhost:/etc/nginx/vhost.d"
- "./html:/usr/share/nginx/html"
- "./dhparam:/etc/nginx/dhparam"
- "./certs:/etc/nginx/certs:ro"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
{% if letsencrypt_enabled %}
acme:
image: nginxproxy/acme-companion:{{ services.nginx_proxy.acme_companion_version }}
restart: always
volumes:
- "./vhost:/etc/nginx/vhost.d"
- "./html:/usr/share/nginx/html"
- "./dhparam:/etc/nginx/dhparam:ro"
- "./certs:/etc/nginx/certs"
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- proxy
{% endif %}
networks:
external_services:
external: true

View File

@ -0,0 +1,58 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: osixia/openldap:{{ services.openldap.version }}
restart: unless-stopped
tty: true
stdin_open: true
volumes:
- "./var/lib/ldap:/var/lib/ldap"
- "./etc/slapd.d:/etc/ldap/slapd.d"
- "./certs:/container/service/slapd/assets/certs/"
ports:
- "389:389"
- "636:636"
hostname: "{{ services.openldap.domain }}"
domainname: "{{ services.openldap.domain }}" # important: same as hostname
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "{{ base_domain }}"
LDAP_DOMAIN: "{{ base_domain }}"
LDAP_BASE_DN: ""
LDAP_ADMIN_PASSWORD: "{{ ldap_admin_password }}"
LDAP_CONFIG_PASSWORD: "{{ ldap_config_password }}"
LDAP_READONLY_USER: false
LDAP_RFC2307BIS_SCHEMA: false
LDAP_BACKEND: mdb
LDAP_TLS: true
LDAP_TLS_CRT_FILENAME: ldap.crt
LDAP_TLS_KEY_FILENAME: ldap.key
LDAP_TLS_CA_CRT_FILENAME: ca.crt
LDAP_TLS_ENFORCE: false
LDAP_TLS_CIPHER_SUITE: SECURE256:-VERS-SSL3.0
LDAP_TLS_PROTOCOL_MIN: "3.1"
LDAP_TLS_VERIFY_CLIENT: demand
LDAP_REPLICATION: false
KEEP_EXISTING_CONFIG: false
LDAP_REMOVE_CONFIG_AFTER_SETUP: true
LDAP_SSL_HELPER_PREFIX: ldap
admin:
image: osixia/phpldapadmin:{{ services.openldap.phpldapadmin_version }}
restart: unless-stopped
networks:
- default
- external_services
environment:
PHPLDAPADMIN_LDAP_HOSTS: app
PHPLDAPADMIN_HTTPS: false
PHPLDAPADMIN_TRUST_PROXY_SSL: true
VIRTUAL_HOST: "{{ services.openldap.domain }}"
LETSENCRYPT_HOST: "{{ services.openldap.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,38 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
db:
image: postgres:{{ services.passit.postgres_version }}
restart: always
volumes:
- "./data:/var/lib/postgresql/data"
environment:
POSTGRES_USER: passit
POSTGRES_PASSWORD: "{{ postgres_passwords.passit }}"
app:
image: passit/passit:{{ services.passit.version }}
command: bin/start.sh
restart: always
networks:
- default
- postfix
- external_services
environment:
DATABASE_URL: postgres://passit:{{ postgres_passwords.passit }}@db:5432/passit
SECRET_KEY: "{{ passit_secret_key }}"
IS_DEBUG: "False"
EMAIL_URL: smtp://noop@{{ smtp_host }}:{{ smtp_port }}
DEFAULT_FROM_EMAIL: noreply@{{ services.passit.domain }}
EMAIL_CONFIRMATION_HOST: https://{{ services.passit.domain }}
FIDO_SERVER_ID: "{{ services.passit.domain }}"
VIRTUAL_HOST: "{{ services.passit.domain }}"
LETSENCRYPT_HOST: "{{ services.passit.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
postfix:
external: true
external_services:
external: true

View File

@ -0,0 +1,21 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: portainer/portainer-ee:{{ services.portainer.version }}
restart: always
networks:
- external_services
volumes:
- ".:/data"
- "/var/run/docker.sock:/var/run/docker.sock:rw"
environment:
VIRTUAL_HOST: "{{ services.portainer.domain }}"
VIRTUAL_PORT: "9000"
LETSENCRYPT_HOST: "{{ services.portainer.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,22 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: boky/postfix:{{ services.postfix.version }}
restart: always
networks:
postfix:
aliases:
- postfix
volumes:
- "./dkim:/etc/opendkim/keys"
environment:
# Get all services which have allowed_sender_domain defined
ALLOWED_SENDER_DOMAINS: "{{ services | dict2items | selectattr('value.allowed_sender_domain', 'true') | map(attribute='value.domain') | join(' ') }}"
HOSTNAME: "{{ services.postfix.domain }}" # the name the smtp server will identify itself as
DKIM_AUTOGENERATE: true
networks:
postfix:
external: true

View File

@ -0,0 +1,20 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: jgeusebroek/privatebin:{{ services.privatebin.version }}
restart: unless-stopped
volumes:
- "./cfg:/privatebin/cfg"
- "./data:/privatebin/data"
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.privatebin.domain }}"
LETSENCRYPT_HOST: "{{ services.privatebin.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,41 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
db:
image: postgres:{{ services.rallly.postgres_version }}
restart: always
shm_size: 256mb
volumes:
- "./postgres:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: "{{ postgres_passwords.rallly }}"
POSTGRES_DB: rallly_db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
app:
image: lukevella/rallly:{{ services.rallly.version }}
restart: always
networks:
- default
- external_services
- postfix
env_file: rallly.env
environment:
VIRTUAL_HOST: "{{ services.rallly.domain }}"
VIRTUAL_PORT: "3000"
LETSENCRYPT_HOST: "{{ services.rallly.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
depends_on:
db:
condition: service_healthy
networks:
external_services:
external: true
postfix:
external: true

View File

@ -0,0 +1,50 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
backup:
image: mazzolino/restic:{{ services.restic.version }}
restart: always
hostname: {{ inventory_hostname_short }}
domainname: {{ inventory_hostname }}
environment:
RUN_ON_STARTUP: false
BACKUP_CRON: "0 30 3 * * *"
RESTIC_REPOSITORY: sftp:{{ services.restic.remote_user }}@{{ services.restic.remote_domain }}:{{ services.restic.repository }}
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
RESTIC_BACKUP_SOURCES: /mnt/volumes
RESTIC_BACKUP_ARGS: >-
--tag datacoop-volumes
--exclude '*.tmp'
--exclude '/mnt/volumes/mastodon/mastodon_data/cache/'
--exclude '/mnt/volumes/restic/'
--verbose
RESTIC_FORGET_ARGS: >-
--keep-last 10
--keep-daily 7
--keep-weekly 5
--keep-monthly 12
TZ: Europe/Copenhagen
POST_COMMANDS_FAILURE: /run/libexec/failure.sh
POST_COMMANDS_SUCCESS: /run/libexec/success.sh
volumes:
- "./ssh:/run/secrets/.ssh:ro"
- "./scripts:/run/libexec:ro"
- "/docker-volumes:/mnt/volumes:ro"
networks:
- postfix
prune:
image: mazzolino/restic:{{ services.restic.version }}
environment:
RUN_ON_STARTUP: false
PRUNE_CRON: "0 30 4 * * *"
RESTIC_REPOSITORY: sftp:{{ services.restic.remote_user }}@{{ services.restic.remote_domain }}:{{ services.restic.repository }}
RESTIC_PASSWORD: "{{ restic_secrets.repository_password }}"
TZ: Europe/copenhagen
volumes:
- "./ssh:/run/secrets/.ssh:ro"
networks:
postfix:
external: true

View File

@ -0,0 +1,22 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: docker.data.coop/unipi:{{ services.slides_2022_website.version }}
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.slides_2022_website.domain }}"
LETSENCRYPT_HOST: "{{ services.slides_2022_website.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
command: --remote=https://git.data.coop/data.coop/slides.git#slides2022
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun"
networks:
external_services:
external: true

View File

@ -0,0 +1,17 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: ulovliglogning/ulovliglogning.dk:latest
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.ulovliglogning_website.domains | join(',') }}"
LETSENCRYPT_HOST: "{{ services.ulovliglogning_website.domains | join(',') }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,21 @@
# vim: ft=yaml.docker-compose
version: '3.3'
services:
uptime-kuma:
image: "louislam/uptime-kuma:{{ services.uptime_kuma.version }}"
restart: always
container_name: uptime-kuma
networks:
- external_services
volumes:
- "./uptime-kuma-data:/app/data"
environment:
VIRTUAL_HOST: "{{ services.uptime_kuma.domain }},{{ services.uptime_kuma.status_domain }}"
LETSENCRYPT_HOST: "{{ services.uptime_kuma.domain }},{{ services.uptime_kuma.status_domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
networks:
external_services:
external: true

View File

@ -0,0 +1,22 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
web:
image: docker.data.coop/unipi:{{ services.vhs_website.version }}
restart: unless-stopped
networks:
- external_services
environment:
VIRTUAL_HOST: "{{ services.vhs_website.domain }}"
LETSENCRYPT_HOST: "{{ services.vhs_website.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
command: --remote=https://git.data.coop/vhs.data.coop/website.git#main
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun"
networks:
external_services:
external: true

View File

@ -0,0 +1,12 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
app:
image: containrrr/watchtower:{{ services.watchtower.version }}
restart: unless-stopped
environment:
WATCHTOWER_POLL_INTERVAL: "60"
volumes:
- "/root/.docker/config.json:/config.json:ro"
- "/var/run/docker.sock:/var/run/docker.sock"

View File

@ -0,0 +1,32 @@
# vim: ft=yaml.docker-compose
version: "3.8"
services:
db:
image: mariadb:{{ services.writefreely.mariadb_version }}
restart: unless-stopped
volumes:
- "./db:/var/lib/mysql"
environment:
MYSQL_DATABASE: writefreely
MYSQL_ROOT_PASSWORD: {{ writefreely_secrets.db_password }}
app:
image: ghcr.io/writefreely/writefreely:{{ services.writefreely.version }}
restart: unless-stopped
networks:
- default
- external_services
volumes:
- "./keys:/go/keys"
- "./config.ini:/go/config.ini"
environment:
VIRTUAL_HOST: "{{ services.writefreely.domain }}"
LETSENCRYPT_HOST: "{{ services.writefreely.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
depends_on:
- db
networks:
external_services:
external: true

View File

@ -0,0 +1,52 @@
{
"default_server_config": {
"m.homeserver": {
"base_url": "https://{{ services.matrix.domain }}"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "element.data.coop",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar-staging.riot.im/scalar/api",
"https://scalar.vector.im/api"
],
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_rich_quoting": "enable",
"feature_pinning": "enable",
"feature_presence_management": "enable",
"feature_sticker_messages": "enable",
"feature_jitsi": "enable",
"feature_tag_panel": "enable",
"feature_keybackup": "enable",
"feature_custom_status": "enable",
"feature_custom_tags": "enable",
"feature_lazyloading": "enable",
"feature_tabbed_settings": "enable",
"feature_sas": "enable"
},
"welcomeUserId": "",
"piwik": false,
"roomDirectory": {
"servers": [
"{{ base_domain }}"
]
},
"enable_presence_by_hs_url": {
"https://{{ services.matrix.domain }}": false
},
"terms_and_conditions_links": [
{
"url": "https://riot.im/privacy",
"text": "Privacy Policy"
},
{
"url": "https://matrix.org/docs/guides/riot_im_cookie_policy",
"text": "Cookie Policy"
}
]
}

View File

@ -0,0 +1,183 @@
# Mailu main configuration file
#
# This file is autogenerated by the configuration management wizard for compose flavor.
# For a detailed list of configuration variables, see the documentation at
# https://mailu.io
###################################
# Common configuration variables
###################################
# Set to a randomly generated 16 bytes string
SECRET_KEY={{ mailu_secret_key }}
# Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)
SUBNET={{ services.mailu.subnet }}
# Main mail domain
DOMAIN={{ base_domain }}
# Hostnames for this server, separated with comas
HOSTNAMES={{ services.mailu.domain }}
# Postmaster local part (will append the main mail domain)
POSTMASTER=admin
# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail, mail-letsencrypt)
TLS_FLAVOR=mail
# Authentication rate limit per IP (per /24 on ipv4 and /56 on ipv6)
AUTH_RATELIMIT_IP=1200/hour
# Authentication rate limit per user (regardless of the source-IP)
AUTH_RATELIMIT_USER=100/day
# Opt-out of statistics, replace with "True" to opt out
DISABLE_STATISTICS=True
###################################
# Optional features
###################################
# Expose the admin interface (value: true, false)
ADMIN=true
# Choose which webmail to run if any (values: roundcube, rainloop, none)
WEBMAIL=snappymail
# Expose the API interface (value: true, false)
API=false
# Dav server implementation (value: radicale, none)
WEBDAV=none
# Antivirus solution (value: clamav, none)
ANTIVIRUS=none
# Scan Macros solution (value: true, false)
SCAN_MACROS=false
###################################
# Mail settings
###################################
# Message size limit in bytes
# Default: accept messages up to 50MB
# Max attachment size will be 33% smaller
MESSAGE_SIZE_LIMIT=50000000
# Message rate limit (per user)
MESSAGE_RATELIMIT=1000/day
# Networks granted relay permissions
# Use this with care, all hosts in this networks will be able to send mail without authentication!
RELAYNETS=
# Will relay all outgoing mails if configured
RELAYHOST=
# Enable fetchmail
FETCHMAIL_ENABLED=False
# Fetchmail delay
FETCHMAIL_DELAY=600
# Recipient delimiter, character used to delimiter localpart from custom address part
RECIPIENT_DELIMITER=+
# DMARC rua and ruf email
DMARC_RUA=admin
DMARC_RUF=admin
# Welcome email, enable and set a topic and body if you wish to send welcome
# emails to all users.
WELCOME=false
WELCOME_SUBJECT=Welcome to your new email account
WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!
# Maildir Compression
# choose compression-method, default: none (value: gz, bz2, lz4, zstd)
COMPRESSION=
# change compression-level, default: 6 (value: 1-9)
COMPRESSION_LEVEL=
# IMAP full-text search is enabled by default. Set the following variable to off in order to disable the feature.
# FULL_TEXT_SEARCH=off
###################################
# Web settings
###################################
# Path to redirect / to
WEBROOT_REDIRECT=/webmail
# Path to the admin interface if enabled
WEB_ADMIN=/admin
# Path to the webmail if enabled
WEB_WEBMAIL=/webmail
# Path to the API interface if enabled
WEB_API=/api
# Website name
SITENAME={{ base_domain }}
# Linked Website URL
WEBSITE=https://{{ base_domain }}
###################################
# Advanced settings
###################################
# Log driver for front service. Possible values:
# json-file (default)
# journald (On systemd platforms, useful for Fail2Ban integration)
# syslog (Non systemd platforms, Fail2Ban integration. Disables `docker-compose log` for front!)
# LOG_DRIVER=json-file
# Docker-compose project name, this will prepended to containers names.
COMPOSE_PROJECT_NAME=mailu
# Number of rounds used by the password hashing scheme
CREDENTIAL_ROUNDS=12
# Header to take the real ip from
REAL_IP_HEADER=X-Forwarded-For
# IPs for nginx set_real_ip_from (CIDR list separated by commas)
REAL_IP_FROM={{ services.mailu.subnet }}
# choose wether mailu bounces (no) or rejects (yes) mail when recipient is unknown (value: yes, no)
REJECT_UNLISTED_RECIPIENT=
# Log level threshold in start.py (value: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET)
LOG_LEVEL=WARNING
# Timezone for the Mailu containers. See this link for all possible values https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=Europe/Copenhagen
# Default spam threshold used for new users
DEFAULT_SPAM_THRESHOLD=80
# API token required for authenticating to the RESTful API.
# This is a mandatory setting for using the RESTful API.
API_TOKEN=
###################################
# Container address settings
###################################
ADMIN_ADDRESS=admin.mailu
###################################
# Database settings
###################################
DB_FLAVOR=postgresql
DB_USER=mailu
DB_PW={{ postgres_passwords.mailu }}
DB_HOST=postgres
DB_NAME=mailu

View File

@ -0,0 +1,59 @@
# This is a sample configuration file. You can generate your configuration
# with the `rake mastodon:setup` interactive setup wizard, but to customize
# your setup even further, you'll need to edit it manually. This sample does
# not demonstrate all available configuration options. Please look at
# https://docs.joinmastodon.org/admin/config/ for the full documentation.
# Note that this file accepts slightly different syntax depending on whether
# you are using `docker-compose` or not. In particular, if you use
# `docker-compose`, the value of each declared variable will be taken verbatim,
# including surrounding quotes.
# See: https://github.com/mastodon/mastodon/issues/16895
# Federation
# ----------
# This identifies your server and cannot be changed safely later
# ----------
LOCAL_DOMAIN={{ services.mastodon.domain }}
# Redis
# -----
REDIS_HOST=redis
REDIS_PORT=6379
# PostgreSQL
# ----------
DB_HOST=db
DB_USER=postgres
DB_NAME=mastodon
DB_PASS={{ postgres_passwords.mastodon }}
DB_PORT=5432
# ------------------------
ES_ENABLED=false
# Secrets
# -------
# Make sure to use `rake secret` to generate secrets
# -------
SECRET_KEY_BASE={{ mastodon_secrets.secret_key_base }}
OTP_SECRET={{ mastodon_secrets.otp_secret }}
# Web Push
# --------
# Generate with `rake mastodon:webpush:generate_vapid_key`
# --------
VAPID_PRIVATE_KEY={{ mastodon_secrets.vapid_private_key }}
VAPID_PUBLIC_KEY={{ mastodon_secrets.vapid_public_key }}
# Sending mail
# ------------
SMTP_SERVER={{ smtp_host }}
SMTP_PORT={{ smtp_port }}
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@{{ services.mastodon.domain }}
# File storage (optional)
# -----------------------
S3_ENABLED=false

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
NEXT_PUBLIC_BASE_URL="https://{{ services.rallly.domain }}"
DATABASE_URL="postgres://postgres:{{ postgres_passwords.rallly }}@db:5432/rallly_db"
SECRET_PASSWORD="{{ rallly_secrets.secret_password }}"
SUPPORT_EMAIL="noreply@{{ services.rallly.domain }}"
SMTP_HOST="{{ smtp_host }}"
SMTP_PORT="{{ smtp_port }}"
SMTP_SECURE="false"
SMTP_USER=noop
SMTP_PWD=noop

View File

@ -0,0 +1,14 @@
#!/bin/sh
curl smtp://{{ smtp_host }} --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --upload-file . << END_OF_MAIL
From: Restic backup <{{ services.restic.mail_from }}>
To: admin@data.coop
Subject: Restic backup failed
Date: $(date)
Dear sir or madam,
Tonight's backup failed!
Best,
Your backup software.
END_OF_MAIL

View File

@ -0,0 +1,3 @@
Host {{ services.restic.remote_domain }}
ServerAliveInterval 60
ServerAliveCountMax 240

View File

@ -0,0 +1 @@
{{ services.restic.remote_domain }} {{ services.restic.host_key }}

View File

@ -0,0 +1,2 @@
#!/bin/sh
curl '{{ restic_secrets.uptime_kuma_url }}'

View File

@ -0,0 +1,44 @@
[server]
port = 8080
bind = 0.0.0.0
autocert = false
gopher_port = 0
[database]
type = mysql
username = root
password = {{ writefreely_secrets.db_password }}
database = writefreely
host = db
port = 3306
tls = false
[app]
site_name = data.coop
site_description =
host = https://{{ services.writefreely.domain }}
theme = write
editor =
disable_js = false
webfonts = true
landing =
simple_nav = false
wf_modesty = false
chorus = false
forest = false
disable_drafts = false
single_user = false
open_registration = false
open_deletion = false
min_username_len = 3
max_blogs = 1
federation = true
public_stats = false
monetization = false
notes_only = false
private = false
local_timeline = true
user_invites = admin
default_visibility =
update_checks = false
disable_password_auth = false

View File

@ -1,8 +1,17 @@
# vim: ft=yaml.ansible
---
- name: Install necessary packages
- name: Install necessary packages via apt
apt:
name: "{{ packages }}"
vars:
packages:
- aptitude
- python3-pip
- aptitude
- python3-pip
- apparmor
- haveged
- mosh
- name: Install Dell OpenManage
apt:
name: srvadmin-all
when: not vagrant and not skip_dell_apt_repo

View File

@ -0,0 +1,20 @@
# vim: ft=yaml.ansible
---
- name: Import dell apt signing key
apt_key:
id: "1285491434D8786F"
keyserver: "keyserver.ubuntu.com"
- name: Configure dell apt repo
apt_repository:
repo: "deb https://linux.dell.com/repo/community/openmanage/10101/focal focal main"
state: present
- name: Restrict dell apt repo"
copy:
dest: "/etc/apt/preferences.d/dell"
content: |
Explanation: Deny all packages from this repo that exist elsewhere
Package: *
Pin: origin "linux.dell.com"
Pin-Priority: 400

View File

@ -0,0 +1,23 @@
# vim: ft=yaml.ansible
---
- name: Setup firewall with UFW
community.general.ufw:
state: enabled
policy: deny
- name: Allow necessary ports
community.general.ufw:
rule: allow
port: "{{ item.port }}"
proto: "{{ item.proto | default('tcp') }}"
loop:
- port: 22 # Gitea SSH
- port: 80 # HTTP
- port: 443 # HTTPS
- port: 389 # OpenLDAP
- port: 636 # OpenLDAP
- port: 25 # Email
- port: 465 # Email
- port: 587 # Email
- port: 993 # Email
- port: 19022 # SSH

Some files were not shown because too many files have changed in this diff Show More