mirror of
https://github.com/jaypyles/Scraperr.git
synced 2025-12-14 03:36:01 +00:00
wip: deployment guide
This commit is contained in:
4
Makefile
4
Makefile
@@ -3,8 +3,8 @@
|
||||
COMPOSE_DEV = docker compose -f docker-compose.yml -f docker-compose.dev.yml
|
||||
COMPOSE_PROD = docker compose -f docker-compose.yml
|
||||
|
||||
HOSTNAME_PROD = ...
|
||||
HOSTNAME_DEV = localhost
|
||||
HOSTNAME_PROD = "localhost"
|
||||
HOSTNAME_DEV = "localhost"
|
||||
|
||||
.PHONY: help deps build pull up-prod up-dev down setup deploy
|
||||
|
||||
|
||||
32
README.md
32
README.md
@@ -2,6 +2,8 @@
|
||||
|
||||
Template designed to quickly build full stack apps.
|
||||
|
||||
Utilizes Github Actions and Ansible to build Docker images to quickly deploy onto an AWS EC2 Debian instance.
|
||||
|
||||
## Technologies
|
||||
|
||||
- Containerization: Docker/Docker Compose
|
||||
@@ -12,17 +14,43 @@ Template designed to quickly build full stack apps.
|
||||
|
||||
- Frameworks/Libraries: PDM, TailwindCSS
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Install Ansible
|
||||
|
||||
- Create a Dockerhub account/repo and fill out the Github repo environmental variables:
|
||||
|
||||
- DOCKERHUB_TOKEN
|
||||
- DOCKERHUB_USERNAME
|
||||
- DOCKERHUB_REPO
|
||||
|
||||
- Complete the `config.yaml` and the `inventory.yaml` in the `ansible` directory
|
||||
|
||||
- `github_repo`: Github repo clone address
|
||||
- `deploy_path`: Path where to clone the repo to on the server
|
||||
- `deploy_command`: `Make` command to run to deploy on the server
|
||||
|
||||
## Deployment
|
||||
|
||||
### Local Deployment
|
||||
|
||||
Uses `make` to quickly dispatch `docker-compose` commands.
|
||||
|
||||
- `deps`: rebuilds the frontend to deploy statically using the api
|
||||
|
||||
- `build`: builds the container using `docker-compose build `
|
||||
|
||||
- `up-dev`: ups the container using `docker-compose -f docker-compose.yml up`
|
||||
- `up-prd`: ups the container using `docker-compose -f docker-compose.yml up`
|
||||
|
||||
- `up-prd`: ups the container using `docker-compose -f docker-compose.yml -f docker-compose.dev.yml up`
|
||||
- `up-dev`: ups the container using `docker-compose -f docker-compose.yml -f docker-compose.dev.yml up`
|
||||
which will deploy with local volumes.
|
||||
|
||||
Ex: `make deps build up-dev`
|
||||
|
||||
### Server Deployment
|
||||
|
||||
Easy deployment using `make setup deploy` after completing the required config files.
|
||||
|
||||
- `setup`: Install dependencies and clone repo onto server
|
||||
|
||||
- `deploy`: Deploy on server
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
github_repo: https://github.com/jaypyles/webapp-template.git
|
||||
deploy_path: /home/admin/website
|
||||
deploy_path: /home/admin/site
|
||||
deploy_command: make pull up-prd
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
version: "3"
|
||||
services:
|
||||
frontend:
|
||||
image: jpyles0524/webapp-template:latest
|
||||
build:
|
||||
context: ./
|
||||
container_name: frontend
|
||||
|
||||
Reference in New Issue
Block a user