Skip to content

Commit

Permalink
Merge pull request #200 from bounswe/hotfix_docker_dev
Browse files Browse the repository at this point in the history
Hotfix: make docker dev build work again
  • Loading branch information
kubraaksux authored May 12, 2023
2 parents 716c8ed + fd5ded1 commit d1fb39c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions practice-app/docker-compose_dev.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: '3.1'
services:
app:
container_name: backend
backend_dev:
container_name: backend_dev
image: backend:latest
build: ./backend/disasterresponse
expose:
- "4000"
depends_on:
- db
- db_dev
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/compose-postgres
- SPRING_DATASOURCE_URL=jdbc:postgresql://db_dev:5432/compose-postgres
- SPRING_DATASOURCE_USERNAME=compose-postgres
- SPRING_DATASOURCE_PASSWORD=compose-postgres
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
networks:
- app_network
db:
db_dev:
image: 'postgres:13.1'
container_name: db
container_name: db_dev
environment:
- POSTGRES_USER=compose-postgres
- POSTGRES_PASSWORD=compose-postgres
Expand All @@ -33,22 +33,20 @@ services:
- "3000"
volumes:
- ./frontend/disasterresponse/node_modules:/app/node_modules
- frontend_files:/app/build
- ./frontend/disasterresponse:/app
networks:
- app_network

webserver:
webserver_dev:
image: nginx
container_name: webserver
container_name: webserver_dev
depends_on:
- app
- backend_dev
- frontend_dev
ports:
- "80:80"
- "443:443"
volumes:
- frontend_files:/var/www:r
- ./nginx_dev/:/etc/nginx/conf.d/
networks:
- app_network
Expand Down
2 changes: 1 addition & 1 deletion practice-app/nginx_dev/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {
root /var/www;

location /api/ {
proxy_pass http://app:4000/;
proxy_pass http://backend_dev:4000/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Expand Down

0 comments on commit d1fb39c

Please sign in to comment.