You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/install.md
+90-32
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,18 @@ The codespace includes Mailhog, which will trap any emails sent by MyRadio. To s
24
24
click the Local Address next to port 8025 in the Ports panel.
25
25
26
26
## Docker Install
27
+
27
28
If you have Docker on your system, use Docker Compose to set up an environment.
28
-
Simply run `docker compose up -d`, and visit "https://localhost:4443/myradio/".
29
+
Simply run `docker compose up -d` and visit "https://localhost:4443/myradio/".
30
+
31
+
If you encounter an error with autoload.php:
32
+
find the id of your myradio container using `docker dontainer ls`
33
+
enter a bash session with `docker exec -it [myradioid] bash`
34
+
then in this session run `composer install`
35
+
finally exit the session by running `exit`
29
36
30
37
## Vagrant Install
38
+
31
39
MyRadio comes with a Vagrantfile based on Ubuntu 19.10.
32
40
If you have [Vagrant](https://www.vagrantup.com) installed and want to get
33
41
developing or playing right away, just run `vagrant up` and a few minutes
@@ -43,8 +51,9 @@ so be sure to never run this in a production environment, or remove the
43
51
permission before doing so.
44
52
45
53
## Uncontained Install
54
+
46
55
Install Apache2, PHP, Composer and PostgreSQL on your prefered Unix-based distro.
47
-
Or Windows, if you're into that.
56
+
Or Windows, if you're into that.
48
57
MyRadio has been tested with Ubuntu and FreeBSD.
49
58
50
59
cd to your MyRadio installation and run `composer install`
@@ -74,6 +83,7 @@ Alias /api /usr/local/www/MyRadio/src/PublicAPI
74
83
Restart Apache2, go to http://hostname/myradio
75
84
76
85
To make a new postgresql server, run the following after:
86
+
77
87
```
78
88
pg_createcluster [YOUR_POSTGRES_VERSION] myradio
79
89
su postgres
@@ -85,36 +95,47 @@ CREATE DATABASE myradio WITH OWNER=myradio;
85
95
# Post-Installation
86
96
87
97
## Myradio Setup
98
+
88
99
CONNECT:
89
-
- Open up "https://localhost:4443/myradio/" in a browser
90
-
-[Use Chrome as this often fails to run on Firefox]
91
-
- It will say "connection not private" so press "advanced" and then "proceed"
100
+
101
+
- Open up "https://localhost:4443/myradio/" in a browser
102
+
-[Use Chrome as this often fails to run on Firefox]
103
+
- It will say "connection not private" so press "advanced" and then "proceed"
92
104
93
105
DATABASE:
94
-
- On the intro screen press "Click here to continue"
95
-
- Enter the database details (see Default Credentials) and press Next
96
-
- Press "run task", wait a few seconds and then press "run task" again.
97
-
-[This method is a workaround for a slight bug in how we build the database]
98
-
106
+
107
+
- On the intro screen press "Click here to continue"
108
+
- Enter the database details (see Default Credentials) and press Next
109
+
- Press "run task", wait a few seconds and then press "run task" again.
110
+
-[This method is a workaround for a slight bug in how we build the database]
111
+
99
112
USER:
100
-
-[Here you can make config changes but the defaults are autofilled]
101
-
- Press "complete starting set", scroll and press "save and continue"
102
-
- Input any first and last name, an email (NOT an @york.ac.uk email) and a password
103
-
-[If you enter an @york.ac.uk email you will not be able to login at all]
104
-
- Login using the email and password you just enterted
113
+
114
+
-[Here you can make config changes but the defaults are autofilled]
115
+
- Press "complete starting set", scroll and press "save and continue"
116
+
- Input any first and last name, an email (NOT an @york.ac.uk email) and a password
117
+
-[If you enter an @york.ac.uk email you will not be able to login at all]
118
+
- Login using the email and password you just enterted
119
+
120
+
- If you encounter an error you need to create the file /var/www/myradio/src/MyRadio_Config.local.php with the text from the "Show Config" button
121
+
-[if you are using docker this needs to be done within the docker container using `docker exec -it [myradioid] bash`]
105
122
106
123
## Default Credentials
124
+
107
125
Database: (when building the database, these credentials are needed)
108
-
- Hostname: `postgres` if running in Docker, `localhost` otherwise
109
-
- Database: myradio
110
-
- Username: myradio
111
-
- Password: myradio
126
+
127
+
- Hostname: `postgres` if running in Docker, `localhost` otherwise
128
+
- Database: myradio
129
+
- Username: myradio
130
+
- Password: myradio
112
131
113
132
Vagrant VM: (if you need to ssh into the virtual machine)
114
-
- Username: vagrant
115
-
- Password: vagrant
133
+
134
+
- Username: vagrant
135
+
- Password: vagrant
116
136
117
137
## Tests
138
+
118
139
MyRadio uses [Codeception](http://codeception.com/quickstart) for its test suite.
119
140
120
141
[This was written with a Vagrant install in mind - has not been tested on Docker]
@@ -132,28 +153,65 @@ blanks the `myradio_test` database each time it is ran, so it can be used to
132
153
reset the database and config file, should this prove necessary.
133
154
134
155
Summary:
135
-
*`composer install`
136
-
*`vagrant up`
137
-
*`vagrant ssh -- /vagrant/scripts/reset-db.sh`
138
-
*`src/vendor/bin/codecept run`
156
+
157
+
-`composer install`
158
+
-`vagrant up`
159
+
-`vagrant ssh -- /vagrant/scripts/reset-db.sh`
160
+
-`src/vendor/bin/codecept run`
139
161
140
162
The vagrant initialisation script also runs `composer install`, but that is run
141
163
on the virtual machine which also installs the PHP extensions required for
142
164
Codeception. These extensions may be missing locally, so running composer will
143
165
confirm that they are present.
144
166
145
167
## Next Steps
168
+
146
169
Once you've got through the setup wizard, the next thing that's most useful to
147
170
you is most likely creating a show.
148
171
149
172
To do this, you first need to:
150
-
- Create a Term (Show Scheduler -> Manage Terms)
151
-
- Create a Show (List My Shows -> Create a Show)
152
-
- Apply for a Season of your new Show (List My Shows -> New Season)
153
-
- Schedule the Season (Shows Scheduler)
173
+
174
+
- Create a Term (Show Scheduler -> Manage Terms)
175
+
- Create a Show (List My Shows -> Create a Show)
176
+
- Apply for a Season of your new Show (List My Shows -> New Season)
177
+
- Schedule the Season (Shows Scheduler)
178
+
179
+
### Setting up your own 2016-site
180
+
181
+
First pull [2016-site](https://github.com/UniversityRadioYork/2016-site)
182
+
183
+
#### database
184
+
185
+
Next you need a api_key to allow the website to access myradio's show information,
186
+
187
+
login into database with details used during setup of myradio
188
+
189
+
`INSERT INTO myury.api_key (key_string, description) VALUES ('ARANDOMSTRINGOFCHARACTERS', '2016-site development api key');`
190
+
191
+
`INSERT INTO myury.api_key_auth (key_string, typeid) VALUES ('ARANDOMSTRINGOFCHARACTERS', (SELECT typeid FROM l_action WHERE phpconstant = 'AUTH_APISUDO'));`
192
+
193
+
[please choose a better key than 'ARANDOMSTRINGOFCHARACTERS']
194
+
195
+
You might need add some other database columns to create shows
196
+
197
+
for example:
198
+
199
+
- explict podcasts (to create shows)
200
+
- selector (expected by 2016-site/can remove this from models/index.go 2016-site)
201
+
202
+
2016-site uses parts of database that aren't made on myradio creation,
203
+
204
+
#### finishing steps
205
+
206
+
This will fix shows not loading on 2016-site when using the base myradio database
207
+
208
+
After completing all these setups:
209
+
210
+
you can use setup guide in [2016-site](https://github.com/UniversityRadioYork/2016-site),
211
+
And setup a reverse proxy to "https://localhost:4443/api/v2" or configure ssl for https connections
212
+
To complete the setup.
154
213
155
214
### A note on Seasons and Terms
156
-
MyRadio splits Shows into "Seasons". Any Season is applied to in relation to a
157
-
"Term", which is a 10-week space of time. This is because The University of
158
-
York has 10 week terms, if you didn't know.
159
215
216
+
MyRadio splits Shows into "Seasons". Any Season is applied to in relation to a
217
+
"Term", which is a user defined space of time (normally 11-15 weeks). This is because The University of York has 12 week semesters, if you didn't know.
INSERT INTOmetadata.metadata_keyVALUES (20,'upload_starttime',false,'In the case where a manual upload is required (because an event started late) will need to start late. This is a UTC time.',300,false);
5
+
INSERT INTOmetadata.metadata_keyVALUES (21,'upload_endtime',false,'In the case where a manual upload is required (because an event started late) will need to finish early/late.',300,false);
0 commit comments