forked from eScholarship/jschol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lando.yml
111 lines (106 loc) · 3.4 KB
/
.lando.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
name: jschol
# CAREFUL with this env file, Docker env files don't support interpolation!
env_file:
- defaults.env
- local.env
keys:
services:
appserver:
type: ruby:2.5
ports:
- '18880:18880'
overrides:
# Pass SSH auth.
volumes:
- type: bind
# Linux user: add 'export LANDO_SSH_AUTH_SOCK="${SSH_AUTH_SOCK}' at the end of your ~/.bashrc:
# Mac user: MacOS specific path is here as the variable default value, nothing to do.
source: "${LANDO_SSH_AUTH_SOCK:-/run/host-services/ssh-auth.sock}"
target: /run/host-services/ssh-auth.sock
environment:
SSH_AUTH_SOCK: "/run/host-services/ssh-auth.sock"
GEM_HOME: "/usr/local/bundle"
PATH: "/usr/local/bundle/bin:/usr/local/bundle/gems/bin:${PATH}"
ports:
- '18880:18880'
command:
- /app/gulp
build_as_root:
- apt-get update -qq
- apt-get install -y apt-transport-https
- apt-get install -y vim net-tools
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update -qq
- apt-get autoclean
- apt-get install mariadb-client build-essential libpq-dev yarn nodejs -y
- gem install bundler
- apt-get autoclean
- chown www-data:www-data /run/host-services/ssh-auth.sock
- chmod g+w /run/host-services/ssh-auth.sock
build:
# - gem install bundler
- cd /app && /app/setup.sh
run:
run_as_root:
- chown www-data:www-data /run/host-services/ssh-auth.sock
- chmod g+w /run/host-services/ssh-auth.sock
moreHttpPorts:
- '18880'
scanner: true
db:
type: mysql
portforward: true
creds:
user: escholdba
password: hard2guess
database: local_eschol_prod
events:
post-start:
- appserver: test -e ~/.ssh/config || printf 'Host *\n AddKeysToAgent yes\n' > ~/.ssh/config
tooling:
mysql:
service: db
cmd: mysql -u root
'db-import <file>':
service: :host
description: Imports a dump file into a database service
cmd: /helpers/sql-import.sh
options:
host:
description: The database service to use
default: db
alias:
- h
no-wipe:
description: Do not destroy the existing database before an import
boolean: true
npm:
service: appserver
description: Runs npm commands on the Lando Jschol appserver
yarn:
service: appserver
description: Runs yarn commands on the Lando Jschol appserver
ruby:
service: appserver
description: Runs ruby commands on the Lando Jschol appserver
bundle:
service: appserver
description: Runs bundle commands on the Lando Jschol appserver
test:
service: appserver
cmd: ruby tools/maybeSocks.rb && ruby test/quick.rb
description: Runs the quicktest suite on the Lando Jschol appserver
socks:
service: appserver
cmd:
- ruby tools/maybeSocks.rb
- echo "==> running netstat -tunl to confirm SOCKS_PORT is open <=="
- netstat -tunl | grep ${SOCKS_PORT}
description: Sets the socks proxy tunnel back up, if you have been too idle
ssh-fix:
service: appserver
description: Fix ssh auth sock permission for MacOS users. Lando rebuild fixes the problem as well.
user: root