mirror of
https://github.com/DarrylNixon/ghostforge
synced 2024-04-22 06:27:20 -07:00
We'll deploy with docker because it's easier for
students to try, review, and give feedback. Also, maybe it'll make actual development easier.
This commit is contained in:
parent
25ca052ec1
commit
3cc1dfcd14
7 changed files with 67 additions and 12 deletions
19
.env
Normal file
19
.env
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# DATABASE_* variables are used both to initially configure the
|
||||||
|
# ghostforge postgresql database and to later access the data from
|
||||||
|
# ghostforge execution.
|
||||||
|
DATABASE_USER=ghost
|
||||||
|
DATABASE_PASSWORD=
|
||||||
|
DATABASE_NAME=ghostforge
|
||||||
|
|
||||||
|
# GHOSTFORGE_*_WEB_PORT variables are used to determine what
|
||||||
|
# port the web interface is served on within the container (INTERNAL)
|
||||||
|
# and what port this will map to on the host (HOST).
|
||||||
|
#
|
||||||
|
# If you're using a dockerized reverse proxy, you may want to remove
|
||||||
|
# the port mapping entirely within docker-compose.yml.
|
||||||
|
GHOSTFORGE_HOST_WEB_PORT=1337
|
||||||
|
GHOSTFORGE_INTERNAL_WEB_PORT=1337
|
||||||
|
|
||||||
|
# GHOSTFORGE_ENV is used to determine debug verbosity
|
||||||
|
# Valid values are [prod, dev]
|
||||||
|
GHOSTFORGE_ENV=prod
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -120,7 +120,7 @@ celerybeat.pid
|
||||||
*.sage.py
|
*.sage.py
|
||||||
|
|
||||||
# Environments
|
# Environments
|
||||||
.env
|
# .env
|
||||||
.venv
|
.venv
|
||||||
env/
|
env/
|
||||||
venv/
|
venv/
|
||||||
|
|
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM python:3.11-alpine
|
||||||
|
|
||||||
|
WORKDIR /ghostforge
|
||||||
|
COPY . .
|
||||||
|
RUN rm .env
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir --requirement requirements.txt
|
||||||
|
RUN pip install .
|
||||||
|
|
||||||
|
ENV GHOSTFORGE_INTERNAL_WEB_PORT=8080
|
||||||
|
ENV PYTHONPATH=/ghostforge/ghostforge
|
||||||
|
|
||||||
|
EXPOSE ${GHOSTFORGE_INTERNAL_WEB_PORT}
|
||||||
|
CMD [ "ghostforge_serve" ]
|
23
README.md
23
README.md
|
@ -7,27 +7,28 @@ ghostforge manages **false identity information** for privacy prudent users.
|
||||||
|
|
||||||
tl;dr it's a fancy DB frontend with sensible design, tailored features, and a nice UX.<br/>
|
tl;dr it's a fancy DB frontend with sensible design, tailored features, and a nice UX.<br/>
|
||||||
|
|
||||||
[Usage](#usage) •
|
|
||||||
[Installation](#installation) •
|
[Installation](#installation) •
|
||||||
|
[Usage](#usage) •
|
||||||
[Contributing](#contributing) •
|
[Contributing](#contributing) •
|
||||||
[License](#license)
|
[License](#license)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To use the tool, run the following command:
|
## Deployment
|
||||||
|
|
||||||
|
Installation instructions are only provided for `docker`-based deployment. For manual deployment, you'll need to set environment variables (see `.env`) for database access before running `ghostforge` yourself.
|
||||||
|
|
||||||
## Installation
|
### With docker
|
||||||
|
You'll need `docker-compose` installed or you can convert the contents of `docker-compose.yml` into `docker run` commands yourself. Install and run `ghostforge` with something like:
|
||||||
To use this tool, you need Python 3 installed. Install it with something like:
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/darrylnixon/ghostforge.git;
|
||||||
|
cd ghostforge;
|
||||||
|
docker-compose up --detach --build;
|
||||||
|
docker exec --interactive --tty ghostforge ghostforge_adduser;
|
||||||
```
|
```
|
||||||
git clone https://github.com/darrylnixon/cf_deny.git
|
|
||||||
cd binhop
|
Follow the prompts to create an administrator user. Assuming you didn't change the default port, browse to [http://localhost:1337/](http://localhost:1337/) to begin using `ghostforge` with your new credentials.
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
ghostforge-db:
|
||||||
|
image: postgres:15.3
|
||||||
|
container_name: ghostforge-db
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ghostforge-db-data:/var/lib/postgresql/data
|
||||||
|
ghostforge:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args: [GHOSTFORGE_ENV=prod]
|
||||||
|
ports: ["${GHOSTFORGE_HOST_WEB_PORT}:${GHOSTFORGE_WEB_PORT}"]
|
||||||
|
image: ghostforge:latest
|
||||||
|
container_name: ghostforge
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on: [ghostforge-db]
|
||||||
|
volumes:
|
||||||
|
ghostforge-db-data:
|
||||||
|
name: ghostforge-db-data
|
0
ghostforge/__init__.py
Normal file
0
ghostforge/__init__.py
Normal file
0
requirements.txt
Normal file
0
requirements.txt
Normal file
Loading…
Reference in a new issue