-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodingteam.org.ru.yml
More file actions
56 lines (49 loc) · 1.51 KB
/
codingteam.org.ru.yml
File metadata and controls
56 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# SPDX-FileCopyrightText: 2025 Friedrich von Never <friedrich@fornever.me>
#
# SPDX-License-Identifier: MIT
---
- name: Main site for codingteam.org.ru
hosts: xmpp2
become: true
vars:
codingteam_org_ru_version: v1.2.1
handlers:
- name: Prune Docker
community.docker.docker_prune:
containers: true
images: true
images_filters:
dangling: false
networks: true
volumes: true
builder_cache: true
- name: Reload nginx
ansible.builtin.service:
name: nginx
state: reloaded
tasks:
- name: Set up the Docker container
community.docker.docker_container:
name: codingteam.org.ru
image_name_mismatch: recreate
image: codingteam/codingteam.org.ru:{{ codingteam_org_ru_version }}
published_ports:
- '5000:5000'
restart_policy: unless-stopped
default_host_ip: ''
env:
ASPNETCORE_URLS: "http://+:5000" # otherwise, it can't be reached (listens to "localhost" only?)
notify: Prune Docker
- name: Set up the nginx configuration file
ansible.builtin.copy:
src: nginx/conf.d/codingteam.org.ru.conf
dest: /etc/nginx/conf.d/codingteam.org.ru.conf
mode: "u=rx,go=rx"
notify: Reload nginx
- name: Create a directory for the old logs # uploaded manually
ansible.builtin.file:
path: /opt/codingteam/old-logs
state: directory
owner: www-data
group: www-data
mode: "u=rx,go=rx"