-
Notifications
You must be signed in to change notification settings - Fork 0
/
meteor instructions.txt
81 lines (66 loc) · 4 KB
/
meteor instructions.txt
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
LOCAL POSTGRES INSTRUCTIONS
0. Install postgres (and pgAdmin, if desired)
1. Edit pg_hba.conf so that local connections have method "trust"
(on Windows: C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf)
2. Create "admin" and "guest" roles (both can login, admin has all privileges, guest has none)
3. Create minimal_bears database ($ createdb minimal_bears)
4. Run schema.sql and data.sql
On Mac:
Run database server with [anywhere]$ postgres -D usr/local/var/postgres
(correct permissions if necessary)
On Windows:
If postgres is not running, check under services
RUNNING THE APP
On Windows (PowerShell): .\run-app.ps1
On Unix: ./run-app.sh
FIRST-TIME DEPLOYMENT TO GANDI INSTRUCTIONS
(See also docs at https://wiki.gandi.net/en/simple/git)
1. create local directory: $ mkdir GandiBuild
2. initialise git: $ git init
3. connect this directory to the remote directory: $ git remote add origin ssh+git://[email protected]/default.git
[On Windows, install ssh: https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH]
BUILD IT, ADD IT, COMMIT IT, PUSH IT (... deploy it)
0. GandiBuild $ git pull origin master
0b. delete bundle
$ cd ../MinimalBears
1. MinimalBears $ meteor build ../GandiBuild/ --directory --architecture os.linux.x86_64
$ cd ../GandiBuild
2. (It may be necessary to merge ./package.json and ./bundle/programs/server/package.json)
3. GandiBuild $ git add -A
["git add ." stages new files and modified files, but not deletions; "git add -A" stages all three]
[make sure not to delete "main.js" or "package.json", which should be outside the bundle]
3b. to check that things are added, run $ git status
4. $ git commit -m "<your message here for future reference>"
5. $ git push origin master
6. $ ssh [email protected] 'clean default.git'
(If this doesn't work, delete node_modules and bundle on the server)
(under /srv/data/web/vhosts/default)
7. $ ssh [email protected] 'deploy default.git <branch>' (branch optional)
NPM INSTRUCTIONS
(Installing npm modules, rather than Meteor Atmosphere modules)
("meteor npm install" uses the Meteor version of npm, while "npm install" uses the sytem version)
1. $ meteor npm install (this installs everything required in package.json)
2. $ meteor npm install --save <packagename> (this installs a new package)
RESET INSTRUCTIONS
1. $ meteor reset (optional - this clears all of Meteor's cached files)
2a. Delete everything in ./node_modules
2b. Re-install $ meteor npm install
GIVE YOURSELF PERMISSION TO EXECUTE FILE
chmod +x [filename] , e.g.
chmod +x test-app.sh
KILL LOCAL POSTGRES POSTMASTER ON MAC (a special note to Staś)
0. If you shut down the terminal without "killing" the PostgreSQL server, then there is a (temporary) file called postmaster.pid that will still be there. If you try to re-run that server afterwards by reloading the terminal and typing:
[anywhere]$ postgres -D /usr/local/var/postgres/
...then you will get (something like) the following error:
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 682) running in data directory "/usr/local/var/postgres"?
- by the way, the PID might be a different number (i.e. other than 682) (more on this below)
1. As far as I can tell, this file is deleted on shutdown, so if you restart the computer it should be fine, but that's obviously a pain.
2. So a better way to do this is to "kill" the postmaster (sounds brutal, but nobody gets hurt). In order to do this, you need to know the postmaster's ID number to identify him. To do this, you can either read the number out of the error as shown above, or you can run:
[anywhere]$ cat /usr/local/var/postgres/postmaster.pid
The PID will be given in the first line of the response.
3. Then you need to run the kill command: [anywhere]$ kill 682 // or whatever number the PID is
4. Now you can run postgres again as normal: [anywhere]$ postgres -D /usr/local/var/postgres/
11/11/2018 - to get graphql to stop complaining about different versions
- added "resolutions" to package.json
- ran "meteor npx yarn install"