-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.runcode.yaml
38 lines (38 loc) · 2.02 KB
/
.runcode.yaml
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
onCreate:
- sudo apt-get update -y
- sudo apt install git postgresql python3 python3-dev python3-virtualenv build-essential ruby ruby-dev gem redis-server memcached redis-tools virtualenv apt-transport-https ca-certificates curl software-properties-common gcc g++ make -y
- |
sudo apt-get -y install postgresql postgresql-contrib
sudo -u postgres psql postgres -c "ALTER USER postgres PASSWORD 'root'"
sudo -u postgres psql postgres -c "CREATE DATABASE peeljobs WITH OWNER = postgres"
- |
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs node-less
sudo gem install sass
sudo ln -s /usr/bin/lessc /usr/local/bin/lessc
- |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ce -y
docker run -d --name peeljobs-elasticsearch -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.6
- |
virtualenv -p python3 ../venv
. ../venv/bin/activate
cp ENV.md .env
pip install -U pip
pip install -r requirements.txt
python manage.py migrate
python manage.py loaddata industries
python manage.py loaddata qualification
python manage.py loaddata skills
python manage.py loaddata countries
python manage.py loaddata states
python manage.py loaddata cities
python manage.py update_index
onStart:
- |
. ../venv/bin/activate
docker run -d --name peeljobs-elasticsearch -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.6
WS_DOMAIN=`cat /home/ubuntu/runcode/ws-url-domain.txt`
printf "\nGO TO THIS URL TO VIEW PAGE \033[4;34m https://8000-${WS_DOMAIN}\033[0;30m\n\n"
python manage.py runserver