generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#3 Create Docker File
- Loading branch information
Showing
3 changed files
with
55 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
version: '' | ||
version: '3.9' | ||
|
||
services: | ||
web: | ||
build: . | ||
command: gunicorn forum.wsgi:application --bind 0.0.0.0:8000 | ||
volumes: | ||
- ./:/Forum | ||
ports: | ||
- 8000:8000 | ||
env_file: | ||
- sample.env | ||
depends_on: | ||
- db | ||
db: | ||
image: postgres:14 | ||
restart: always | ||
volumes: | ||
- db_data:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_USER: ${PG_USER} | ||
POSTGRES_PASSWORD: ${PG_PASSWORD} | ||
POSTGRES_DB: ${PG_DB} | ||
PGDATABASE: ${PG_DB} | ||
PGPASSWORD: ${PG_PASSWORD} | ||
PGUSER: ${PG_USER} | ||
ports: | ||
- ${DB_PORT}:5432 | ||
pgadmin4: | ||
container_name: forum_pgadmin4 | ||
image: dpage/pgadmin4 | ||
restart: always | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] # your email to login at http://localhost:5050/ | ||
PGADMIN_DEFAULT_PASSWORD: 1 # your password to login at http://localhost:5050/ | ||
ports: | ||
- "5050:80" | ||
volumes: | ||
- pgadmin-data:/var/lib/pgadmin/data | ||
volumes: | ||
db_data: | ||
pgadmin-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#db details | ||
SECRET_KEY= | ||
PG_DB= | ||
PG_USER= | ||
PG_PASSWORD= | ||
DB_HOST= | ||
DB_PORT= | ||
SECRET_KEY= 1111 | ||
PG_DB= Forum-Sandbox | ||
PG_USER= user | ||
PG_PASSWORD= postgres | ||
DB_HOST= db | ||
DB_PORT= 5432 | ||
|
||
#SMTP | ||
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend | ||
EMAIL_HOST= | ||
EMAIL_PORT= | ||
EMAIL_USE_TLS= | ||
EMAIL_HOST_USER= | ||
EMAIL_HOST_PASSWORD= | ||
EMAIL_HOST= [email protected] | ||
EMAIL_PORT= 587 | ||
EMAIL_USE_TLS= 1 | ||
EMAIL_HOST_USER= [email protected] | ||
EMAIL_HOST_PASSWORD= test-password | ||
|
||
#origin hostnames allowed to make cross-site HTTP requests | ||
CORS_ORIGIN_WHITELIST= |