https://github.com/elhanarinc/customspiritdjango
Custom version of Spirit project with docker support
https://github.com/elhanarinc/customspiritdjango
aws cdk django docker nginx
Last synced: 3 months ago
JSON representation
Custom version of Spirit project with docker support
- Host: GitHub
- URL: https://github.com/elhanarinc/customspiritdjango
- Owner: elhanarinc
- Created: 2021-05-01T09:03:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-03T11:14:39.000Z (about 5 years ago)
- Last Synced: 2025-03-24T17:52:56.701Z (over 1 year ago)
- Topics: aws, cdk, django, docker, nginx
- Language: CSS
- Homepage:
- Size: 3.32 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Spirit Django Project
Custom version of [Spirit](https://github.com/nitely/Spirit) project.
This project assumes you had already installed these tools:
1. [Docker](https://www.docker.com/)
2. [Nodejs](https://nodejs.org/en/download/)
3. [AWS cli](https://aws.amazon.com/cli/?nc1=h_ls)
4. [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html)
## Development Environment
You just need to install docker and add *.env.dev* for developing the custom version of the spirit project.
Sample *.env.dev*
```
DEBUG=True
SECRET_KEY=
POSTGRE_NAME=
POSTGRE_USER=
POSTGRE_PASSWORD=
POSTGRE_HOST=
POSTGRE_PORT=
```
You can start the project using docker.
Below you can find the sample docker usage:
```
cd /app
docker build -t customspiritdjango .
docker run -p 80:80 -it customspiritdjango:latest
```
After these commands you can access custom version of spirit using:
1. _http://localhost_
2. _http://127.0.0.1_
## Production Deployment
1. First you need to install and configure your [AWS cli](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html).
2. Install [Nodejs](https://nodejs.org/tr/download/package-manager/) then by using it install [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html).
3. Add *.env.prod* to custom spirit django project. Sample one can be found below:
```
DEBUG=True
SECRET_KEY=
POSTGRE_NAME=
POSTGRE_USER=
POSTGRE_PASSWORD=
POSTGRE_HOST=
POSTGRE_PORT=
```
4. Add *.env* to cdk folder
```
CDK_DEPLOY_ACCOUNT=
CDK_DEPLOY_REGION=
CLIENT_NAME=
PROJECT_ENV=
DOMAIN=
```
**App folder** should be looked like this:

**Cdk folder** should be looked like this:

5. After you installed necessary tools and configure *.env* files you can deploy your stack by using these commands:
```
cd /cdk
npm i
cdk bootstrap
cdk synth
cdk deploy
```
6. You can access your custom spirit django project from the domain you have provided.