Last active
December 20, 2018 10:27
-
-
Save bluzir/812966f390f27b99679127cd6d8f0650 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
version: "3" | |
services: | |
db: | |
image: "postgres:9.6.5" | |
volumes: | |
- "dbdata:/var/lib/postgresql/data" | |
env_file: | |
- env_file | |
networks: | |
- db_nw | |
reactapp: | |
image: node:slim | |
volumes: | |
- ./frontend:/frontend | |
- ./public:/frontend/build | |
command: bash -c " | |
cd frontend; | |
yarn install; | |
yarn build;" | |
boxes: | |
build: | |
context: ./backend | |
dockerfile: Dockerfile | |
networks: | |
- db_nw | |
- web_nw | |
depends_on: | |
- db | |
nginx: | |
image: "nginx:1.13.5" | |
ports: | |
- "80:80" | |
volumes: | |
- ./conf.d:/etc/nginx/conf.d | |
- ./public:/public | |
networks: | |
- web_nw | |
depends_on: | |
- boxes | |
networks: | |
db_nw: | |
driver: bridge | |
web_nw: | |
driver: bridge | |
volumes: | |
? dbdata |
This file contains hidden or 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
FROM python:3.6 | |
ENV PYTHONUNBUFFERED 1 | |
COPY . . | |
ENV FLASK_APP cli.py | |
ENV SETTINGS_ENV app.settings.production | |
RUN pip install -r requirements.txt | |
#RUN flask db migrate; flask db upgrade | |
EXPOSE 5070 | |
CMD ["gunicorn", "app:create_app('app.settings.production')"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment