$ docker run -p 8080:8080 -it --name flask -v /home/docks/flask:/var/www/html ubuntu

# apt-get update
# apt-get upgrade
# apt-get install vim
# apt-get install net-tools
# apt-get install nginx # Nginx
# apt-get install uwsgi # uWSGI
# apt-get install uwsgi-plugin-python # python과 uWSGI를 연결하는 플러그인

# apt-get install python3
# apt-get install python3-pip python3-dev
# pip3 install -U pip

# pip3 install virtualenv

# cd /var/www/html
# virtualenv service
# cd service
# . bin/activate
# pip3 install flask
# pip3 install uwsgi

# cd /var/www/html/service
# vi app.py
---
from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello World!'

if __name__ == '__main__':
app.run()
---

# vi /etc/nginx/sites-available/default
---
server {
listen 8080; # 연결할 포트
server_name 0.0.0.0;
location / { try_files $uri @app; }
location @app {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
---

# vi /etc/uwsgi/apps-available/uwsgi.ini
---
[uwsgi]
chdir=/var/www/html/service
chmod-socket=666
callable=app
module=app
socket=/tmp/uwsgi.sock
virtualenv=/var/www/html/service
---

# service nginx restart
# service uwsgi restart

# uwsgi /etc/uwsgi/apps-available/uwsgi.ini


https://ohienbee.blogspot.kr

'Docker' 카테고리의 다른 글

도커 생성한 컨테이너 이미지 삭제  (0) 2020.06.14
도커 우분투 서버 타임존 설정  (0) 2020.06.10
도커 레드마인 설치 및 설정  (0) 2018.04.08
docker, rancher 설치  (0) 2018.01.22
Posted by 앤비
,

macOS,패러럴즈 삭제

macOS 2018. 1. 23. 07:10

rm -rfd ~/library/preferences/com.parallels*

rm -rfd ~/library/preferences/parallels/*

rm -rfd ~/library/preferences/parallels

sudo -s rm -rfd /private/var/db/parallels/stats/*

sudo -s rm -rfd /private/var/db/parallels/stats

sudo -s rm -rfd /private/var/db/parallels

sudo -s rm -rfd /library/logs/parallels.log

sudo -s rm -rfd /library/preferences/parallels/*

sudo -s rm -rfd /library/preferences/parallels

sudo -s rm -rfd /private/var/db/parallels

sudo -s rm -rfd /private/var/.parallels_swap

sudo -s rm -rfd /private/var/db/receipts/'com.parallels*'

sudo -s rm -rfd /private/tmp/qtsingleapp-*-lockfile

sudo -s rm -rfd /private/tmp/com.apple.installer*/*

sudo -s rm -rfd /private/tmp/com.apple.installer*

sudo -s rm -rfd /private/var/root/library/preferences/com.parallels.desktop.plist

sudo rm -fr ~/Library/Logs/parallels.log

sudo rm -fr /Library/Preferences/Parallels/

sudo rm -fr ~/Library/Preferences/Parallels

sudo rm -fr /private/var/.Parallels_swap

sudo rm -fr /private/var/db/Parallels/Stats

sudo rm -fr /private/tmp/qtsingleapp-Parall-c0ce-0-lockfile

sudo rm -fr ~/Library/Preferences/com.parallels


https://ohienbee.blogspot.kr

'macOS' 카테고리의 다른 글

맥에서 선택한 사진들을 PDF 파일로 생성  (0) 2018.04.11
macOS tree 명령어 설치  (0) 2018.02.18
macOS, TensorFlow 설치  (0) 2018.01.22
macOS, 날짜 연산 쉘스크립트  (0) 2018.01.22
macOS, mysql, 맥에서 mysql 삭제  (0) 2018.01.21
Posted by 앤비
,

docker, rancher 설치

Docker 2018. 1. 22. 20:29

$ docker pull rancher/server

$ sudo docker run -d --restart=unless-stopped -p 8080:8080 --name rancher rancher/server:stable

$ docker exec -it rancher bash

$ docker logs {ContainerID} -f


https://ohienbee.blogspot.kr


'Docker' 카테고리의 다른 글

도커 생성한 컨테이너 이미지 삭제  (0) 2020.06.14
도커 우분투 서버 타임존 설정  (0) 2020.06.10
도커 레드마인 설치 및 설정  (0) 2018.04.08
Docker Ubuntu+NGINX+uWSGI+flask  (0) 2018.01.24
Posted by 앤비
,