-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Chengyumeng/develop
优化云环境下开发和部署方案
- Loading branch information
Showing
8 changed files
with
31 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,4 @@ ENV/ | |
# 开发者自定义 | ||
.DS_Store | ||
.idea/ | ||
hack/_dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
.PHONY: docker-build composer build | ||
.PHONY: docker-build docker-run build | ||
|
||
USER := $(shell id -u) | ||
BRANCH := $(shell git rev-parse --abbrev-ref HEAD) | ||
VERSION := $(shell git describe --always --tags | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+") | ||
|
||
docker-build: | ||
docker build -t spider163:$(VERSION) -f hack/spider/Dockerfile . | ||
docker build -t mysql163:$(VERSION) -f hack/mysql/Dockerfile . | ||
docker build -t chengtian/spider163:$(VERSION) -f hack/spider/Dockerfile . | ||
|
||
composer: | ||
docker-compose -p "spider163-$(BRANCH)-$(USER)" up | ||
docker-run: | ||
cd hack && docker-compose up | ||
|
||
build: | ||
pip install -r requirements.txt | ||
python setup.py install | ||
python setup.py clean | ||
pip install -e . | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
FROM python:2.7 | ||
FROM python:3.6 | ||
RUN mkdir /root/code & mkdir /root/spider163 | ||
WORKDIR /root/code | ||
ADD ./ /root/code/ | ||
ADD hack/spider/spider163.conf /root/spider163/spider163.conf | ||
RUN pip install -i http://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com -r requirements.txt && python setup.py install && spider163 --help | ||
CMD spider163 webserver | ||
RUN pip install -e . -i http://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com && spider163 --help | ||
ENTRYPOINT spider163 webserver | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[core] | ||
db=mysql://root:[email protected]/spider?charset=utf8mb4 | ||
db=mysql://root:[email protected]/spider163?charset=utf8mb4 | ||
port=1630 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters