Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug with docker compose, fix hostnames #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
POSTGRES_HOST=app-db
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DB=django
POSTGRES_USER=django
POSTGRES_PASSWORD=django

REDIS_URL=redis://app-redis:6379/1
REDIS_HOST=app-redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=1
REDIS_TIMEOUT=600
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
POSTGRES_HOST=app-db
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=

REDIS_URL=redis://app-redis:6379/1
REDIS_HOST=app-redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=1
REDIS_TIMEOUT=600
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ typings/
.yarn-integrity

# dotenv environment variables file
.env/*
!.env/development.env.template
!.env/production.env.template
.environment/*
!.environment/development.env.template
!.environment/production.env.template

# coverage report
htmlcov/
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ services:
volumes:
- ./server/:/home/app/web/
env_file:
- .env/development.env
- .environment/development.env
command: python manage.py runserver 0.0.0.0:8000
ports:
- 8000:8000
db:
env_file:
- .env/development.env
- .environment/development.env
rq:
build:
context: ./server
dockerfile: Dockerfile.dev
env_file:
- .env/development.env
- .environment/development.env
client:
build:
context: ./client
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ services:
context: ./server
dockerfile: Dockerfile.prod
env_file:
- .env/production.env
- .environment/production.env
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
db:
env_file:
- .env/production.env
- .environment/production.env
rq:
build:
context: ./server
dockerfile: Dockerfile.dev
env_file:
- .env/production.env
- .environment/production.env
client:
build:
context: ./client
dockerfile: Dockerfile.prod
environment:
- NODE_ENV=production
env_file:
- .env/production.env
- .environment/production.env
volumes:
- ./client/node_modules:/app/node_modules
- volume-static:/var/www/staticfiles:ro
Expand Down