-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f00cc7
commit 3755239
Showing
7 changed files
with
44 additions
and
58 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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Build image | ||
run: docker build -t anchor-python-bp-prod:latest -f docker/prod/Dockerfile . | ||
run: docker build -t anchor-python-bp-prod:latest -f Dockerfile . | ||
|
||
- name: Save image | ||
run: docker save anchor-python-bp-prod:latest | gzip > prod.tar.gz | ||
|
@@ -23,7 +23,7 @@ jobs: | |
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
source: "prod.tar.gz" | ||
target: "/home/${{ secrets.USERNAME }}/boilerplate-python/prod_source_code/docker/prod" | ||
target: "/home/${{ secrets.USERNAME }}/boilerplate-python/prod_source_code" | ||
|
||
- name: Deploy image on server | ||
uses: appleboy/[email protected] | ||
|
@@ -32,8 +32,8 @@ jobs: | |
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
cd /home/${{ secrets.USERNAME }}/boilerplate-python/prod_source_code/docker/prod | ||
cd /home/${{ secrets.USERNAME }}/boilerplate-python/prod_source_code | ||
git pull origin main | ||
docker load --input prod.tar.gz | ||
docker-compose -f docker-compose.yml up -d | ||
docker-compose -f docker-compose.prod.yml up -d | ||
rm -f prod.tar.gz |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Build image | ||
run: docker build -t anchor-python-bp-staging:latest -f docker/staging/Dockerfile . | ||
run: docker build -t anchor-python-bp-staging:latest -f Dockerfile . | ||
|
||
- name: Save image | ||
run: docker save anchor-python-bp-staging:latest | gzip > staging.tar.gz | ||
|
@@ -23,7 +23,7 @@ jobs: | |
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
source: "staging.tar.gz" | ||
target: "/home/${{ secrets.USERNAME }}/boilerplate-python/staging_source_code/docker/staging" | ||
target: "/home/${{ secrets.USERNAME }}/boilerplate-python/staging_source_code" | ||
|
||
- name: Deploy image on server | ||
uses: appleboy/[email protected] | ||
|
@@ -32,8 +32,8 @@ jobs: | |
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
cd /home/${{ secrets.USERNAME }}/boilerplate-python/staging_source_code/docker/staging | ||
cd /home/${{ secrets.USERNAME }}/boilerplate-python/staging_source_code | ||
git pull origin staging | ||
docker load --input staging.tar.gz | ||
docker-compose -f docker-compose.yml up -d | ||
docker-compose -f docker-compose.staging.yml up -d | ||
rm -f staging.tar.gz |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
services: | ||
app_dev: | ||
image: anchor-python-bp-dev:latest | ||
command: ["sh", "-c", "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 7001 --reload"] | ||
container_name: app_dev | ||
networks: | ||
- hng-network | ||
restart: unless-stopped | ||
ports: | ||
- 7006:7001 | ||
working_dir: /app | ||
volumes: | ||
- .env:/app/.env | ||
depends_on: | ||
- dev_db | ||
|
||
dev_db: | ||
image: postgres:14.12 | ||
container_name: dev_db | ||
restart: always | ||
volumes: | ||
- dev_db:/var/lib/postgresql/data | ||
- .env:/app/.env | ||
environment: | ||
- POSTGRES_PASSWORD=${DB_PASSWORD?Variable not set} | ||
- POSTGRES_USER=${DB_USER?Variable not set} | ||
- POSTGRES_DB=${DB_NAME?Variable not set} | ||
networks: | ||
- hng-network | ||
|
||
volumes: | ||
dev_db: | ||
|
||
networks: | ||
hng-network: | ||
driver: bridge |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.