Skip to content

Commit

Permalink
fix: ajuste no docker para permitir conexão com containers externos
Browse files Browse the repository at this point in the history
  • Loading branch information
ldurans committed Nov 14, 2022
1 parent d9435f3 commit ee96ffc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ RUN chmod +x /start_production

ENTRYPOINT ["dumb-init", "--"]

CMD dockerize -wait tcp://${POSTGRES_HOST}:${DB_PORT} \
&& npx sequelize db:migrate \
CMD npx sequelize db:migrate \
&& node dist/server.js
15 changes: 11 additions & 4 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ services:
- ./.env
stdin_open: true
tty: true
# command: ./start_production
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ".:/usr/src/app"
# - "/var/izing-media:/usr/src/app/public/"
Expand All @@ -25,14 +26,16 @@ services:
container_name: "izing-redis"
image: 'redis:latest'
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "6377:6379"
- "6379:6379"
env_file:
- ./.env
volumes:
- '/var/izing/redis:/data'
networks:
- izing_network
- izing_db_network

# database containers, one for each db
izing-fixPermissionsPostregres:
Expand All @@ -46,6 +49,8 @@ services:
image: 'bitnami/postgresql:14'
restart: always
container_name: "izing-db"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- ./.env
volumes:
Expand All @@ -61,6 +66,8 @@ services:
image: rabbitmq:3-management
hostname: izing-rabbit
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- ./.env
healthcheck:
Expand All @@ -78,7 +85,7 @@ services:
- 5672:5672
- 15672:15672
networks:
- izing_network
- izing_db_network

networks:
izing_network:
Expand Down

0 comments on commit ee96ffc

Please sign in to comment.