https://github.com/fan9704/web_album
small web album
https://github.com/fan9704/web_album
appengine appengine-python cloudsql django gcp google-cloud-platform
Last synced: 9 months ago
JSON representation
small web album
- Host: GitHub
- URL: https://github.com/fan9704/web_album
- Owner: fan9704
- Created: 2021-09-28T05:05:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T07:56:58.000Z (almost 3 years ago)
- Last Synced: 2025-02-04T13:41:00.701Z (11 months ago)
- Topics: appengine, appengine-python, cloudsql, django, gcp, google-cloud-platform
- Language: Python
- Homepage:
- Size: 3.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Web Album
## Feature
### View photo in browser
> Everyone without login can access photos for free

### Create and Delete web album
> Only Administrator can do that

### Upload new photo
> Only Administrator can do that you can upload at most 5 photos at the same time
> Administrator can give every each of photo description

## Google Cloud Services Structure

## Setup
### Step.1 Google Cloud SQL
Create PostgreSQL in Cloud SQL
```shell
gcloud sql instances create postgre \
--activation-policy=ALWAYS \
--database-version=POSTGRES_14 \
--region=asia-east2 \
--tier=db-n1-standard-1
```
Create Database in Cloud SQL
```shell
gcloud sql databases create webalbum --instance postgre
```
After created checking database is alive in your project
```shell
gcloud sql databases list --instance webalbum
```
Setup Database Management System root password
```shell=
gcloud sql users set-password root \
--host=% \
--instance webalbum \
--password=PASSWORD
```
### Step.2 Google Cloud SQL Proxy
Enter the follow commands in Cloud Shell
```shell
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy
chmod +x cloud_sql_proxy
cloud_sql_proxy -instances=:us-central1:postgre=tcp:5432
```
### Step.3 Create App Engine
```shell
gcloud app create
```
### Other
#### Run Server as localhost
.env file must create in local project
```dotenv
DJANGO_SECRET_KEY =
DEBUG = True
POSTGRES_DB =
POSTGRES_USER =
POSTGRES_PASSWORD =
POSTGRES_DB_URL =
GAE_APPLICATION = False
```
**Note:**
1. Google App Engine not support pipenv don,t use pipenv to manage your dependencies