Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Improves deploy (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea authored Dec 20, 2020
1 parent 92725d3 commit c3ac47e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ celerybeat.pid

# Environments
.env
.gen.env
.venv
env/
venv/
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
help
lock-deps
shell
lint
autotests
lint
build
envfile
runserver
runserver-uvicorn
build
push
pull
deploy

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -61,7 +59,10 @@ build: ## Build docker image
--project-directory . \
build parrot-app

runserver: ## Local startup the app on docker with required services
envfile: ## Generate env file with variables with prefix PARROT_
env | egrep ^PARROT_ > .gen.env

runserver: envfile ## Local startup the app on docker with required services
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
Expand All @@ -70,7 +71,7 @@ runserver: ## Local startup the app on docker with required services
--project-directory . \
up

runserver-uvicorn: ## Local startup the app on docker with uvicorn
runserver-uvicorn: envfile ## Local startup the app on docker with uvicorn
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- "parrot-database"

parrot-database:
image: hub.zxz.su/common/doci/postgres:12.3-05045d0f
image: postgres:12.3
restart: unless-stopped
container_name: parrot-database
environment:
Expand Down
9 changes: 3 additions & 6 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
version: "3.8"

x-default-env: &default-env
environment:
- DEBUG

x-service-base: &service-base
<<: *default-env
image: umahighload/parrot-app:latest
restart: unless-stopped

Expand All @@ -16,7 +11,9 @@ services:
build:
context: .
dockerfile: ./deploy/app/Dockerfile
env_file:
- .gen.env
ports:
- "8042:8042"
- "8042:8042"
container_name: parrot-app
command: bash /app/start-django-uvicorn.sh

0 comments on commit c3ac47e

Please sign in to comment.