Skip to content

Commit 6bc7cba

Browse files
Macaulay, DaneMacaulay, Dane
Macaulay, Dane
authored and
Macaulay, Dane
committed
init
0 parents  commit 6bc7cba

25 files changed

+13861
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/node_modules

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
build

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:8 as nodebuild
2+
COPY ./client /client
3+
WORKDIR /client
4+
RUN npm install
5+
RUN npm run build
6+
7+
FROM python:3.6.6
8+
COPY . /app
9+
COPY --from=nodebuild /build /app/build
10+
WORKDIR /app
11+
RUN pip install pipenv
12+
RUN pipenv install --system --deploy --ignore-pipfile
13+
14+
CMD ["pipenv", "run", "gunicorn", "-k", "gevent", "-b", "0.0.0.0:8080", "wsgi:app"]

Pipfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
7+
8+
[packages]
9+
flask = "*"
10+
pydash = "*"
11+
gunicorn = "*"
12+
gevent = "*"
13+
14+
[dev-packages]
15+
pytest = "*"
16+
pytest-flask = "*"
17+
18+
[requires]
19+
python_full_version = "3.6"

Pipfile.lock

Lines changed: 236 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Flask Vuejs Docker Starter
2+
====================
3+
4+
## Development Setup
5+
6+
* `pipenv install`
7+
8+
* `pipenv shell`
9+
10+
* `export FLASK_APP=services && flask run`
11+
12+
From `client` directory using Node 8.x
13+
14+
* `npm install`
15+
16+
* `npm run serve`
17+
18+
Visit app at http://localhost:8080
19+
20+
## Build
21+
22+
`docker build -t flask-vuejs-docker .`
23+
24+
## Deploy
25+
26+
`docker run -p 80:8080 flask-vuejs-docker`
27+
28+
## Running the tests
29+
30+
`pipenv install --dev`
31+
32+
`pipenv run python -m pytest`

client/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

client/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# client
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```

client/babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

0 commit comments

Comments
 (0)