first commit
This commit is contained in:
commit
695abe054b
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
61
README.md
Normal file
61
README.md
Normal file
@ -0,0 +1,61 @@
|
||||
# Kassenzettel
|
||||
|
||||
Kassenzettel is a web application for managing recipes and shopping lists. It consists of a Django server for the backend and a React frontend for the user interface.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone the repository:
|
||||
|
||||
```
|
||||
git clone https://github.com/username/kassenzettel.git
|
||||
```
|
||||
|
||||
2. Install the Python dependencies:
|
||||
|
||||
```
|
||||
cd receipeServer
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. Install the Node.js dependencies:
|
||||
|
||||
```
|
||||
cd reactFrontend
|
||||
yarn install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Start the Django server:
|
||||
|
||||
```
|
||||
cd receipeServer
|
||||
python manage.py qcluster
|
||||
python manage.py runserver
|
||||
```
|
||||
|
||||
2. Start the React frontend:
|
||||
|
||||
```
|
||||
cd reactFrontend
|
||||
yarn start
|
||||
```
|
||||
|
||||
3. Open the application in a web browser:
|
||||
|
||||
```
|
||||
http://localhost:3000/
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
To update the frontend packages, run:
|
||||
|
||||
```
|
||||
cd ../reactFrontend
|
||||
yarn upgrade
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the [MIT License](LICENSE).
|
||||
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@ -0,0 +1,35 @@
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:alpine
|
||||
container_name: kassenzettel-postgres
|
||||
restart: always
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- ./db:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: example
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: kassenzettel
|
||||
POSTGRES_INITDB_ARGS: "--encoding='UTF8'"
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
container_name: kassenzettel-redis
|
||||
restart: always
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- ./receipeServer/static/:/app/static
|
||||
|
||||
18
nginx.conf
Normal file
18
nginx.conf
Normal file
@ -0,0 +1,18 @@
|
||||
events {}
|
||||
http {
|
||||
include mime.types;
|
||||
sendfile on;
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
|
||||
resolver 127.0.0.1;
|
||||
autoindex off;
|
||||
|
||||
server_name _;
|
||||
server_tokens off;
|
||||
|
||||
root /app/static;
|
||||
gzip_static on;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user