OLD | NEW |
1 # == Class: discourse_docker | 1 # == Class: discourse_docker |
2 # | 2 # |
3 # Depends on module docker (for now) | 3 # Depends on module docker (for now) |
4 # | 4 # |
5 # == Parameters: | 5 # == Parameters: |
6 | 6 |
7 # [*domain*] | 7 # [*domain*] |
8 # Set the domain (hostname) for the site. This will be used in both nginx and d
iscourse settings. | 8 # Set the domain (hostname) for the site. This will be used in both nginx and d
iscourse settings. |
9 # | 9 # |
10 # [*certificate*] | 10 # [*certificate*] |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 ) { | 57 ) { |
58 | 58 |
59 include stdlib | 59 include stdlib |
60 | 60 |
61 package {'git': | 61 package {'git': |
62 ensure => present, | 62 ensure => present, |
63 } | 63 } |
64 | 64 |
65 file {'/var/discourse': | 65 file {'/var/discourse': |
66 ensure => directory, | 66 ensure => directory, |
67 mode => 755, | 67 mode => '755', |
68 owner => root, | 68 owner => root, |
69 group => root | 69 group => root |
70 } | 70 } |
71 | 71 |
72 exec {'fetch-discourse-docker': | 72 exec {'fetch-discourse-docker': |
73 command => "git clone https://github.com/discourse/discourse_docker.git /var
/discourse", | 73 command => "git clone https://github.com/discourse/discourse_docker.git /var
/discourse", |
74 path => ["/usr/bin/", "/bin/"], | 74 path => ["/usr/bin/", "/bin/"], |
75 user => root, | 75 user => root, |
76 timeout => 0, | 76 timeout => 0, |
77 require => [Package['git'], File['/var/discourse']], | 77 require => [Package['git'], File['/var/discourse']], |
78 unless => "test -d /var/discourse/.git" | 78 unless => "test -d /var/discourse/.git" |
79 } | 79 } |
80 | 80 |
81 file {'/var/discourse/containers/app.yml': | 81 file {'/var/discourse/containers/app.yml': |
82 ensure => file, | 82 ensure => file, |
83 mode => 600, | 83 mode => '600', |
84 owner => root, | 84 owner => root, |
85 group => root, | 85 group => root, |
86 content => template('discourse_docker/app.yml.erb'), | 86 content => template('discourse_docker/app.yml.erb'), |
87 require => Class['docker'], | 87 require => Class['docker'], |
88 } | 88 } |
89 | 89 |
90 exec {'rebuild': | 90 exec {'rebuild': |
91 command => '/var/discourse/launcher rebuild app --skip-prereqs', | 91 command => '/var/discourse/launcher rebuild app --skip-prereqs', |
92 user => root, | 92 user => root, |
93 subscribe => File['/var/discourse/containers/app.yml'], | 93 subscribe => File['/var/discourse/containers/app.yml'], |
(...skipping 14 matching lines...) Expand all Loading... |
108 | 108 |
109 nginx::hostconfig {$domain: | 109 nginx::hostconfig {$domain: |
110 source => "puppet:///modules/discourse_docker/site.conf", | 110 source => "puppet:///modules/discourse_docker/site.conf", |
111 certificate => $certificate, | 111 certificate => $certificate, |
112 private_key => $private_key, | 112 private_key => $private_key, |
113 is_default => $is_default, | 113 is_default => $is_default, |
114 log => "access_log_intraforum" | 114 log => "access_log_intraforum" |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
OLD | NEW |