Skip to content

Commit

Permalink
Merge pull request #8 from arthur-mdn/arthur
Browse files Browse the repository at this point in the history
Try docker without volumes
  • Loading branch information
arthur-mdn authored Jan 21, 2025
2 parents 5e84f19 + 5c39979 commit 90553bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
42 changes: 18 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
services:
api-gateway:
build:
context: ./api-gateway
dockerfile: ../Dockerfile
container_name: express-api-gateway
ports:
- "3000:3000"
volumes:
- ./api-gateway:/app
- ./models:/app/models
restart: always
networks:
- api-network
environment:
- USER_SERVICE_URL=http://user-service:3001

user-db:
image: mysql:8.0
Expand All @@ -27,14 +12,28 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: user-service
healthcheck:
test: ["CMD-SHELL", "mysql -u root user-service"]
test: [ "CMD-SHELL", "mysql -u root user-service" ]
timeout: 5s
retries: 3
start_period: 10s
retries: 20
start_period: 3s
networks:
- user-network
- api-network

api-gateway:
build:
context: ./api-gateway
dockerfile: ../Dockerfile
container_name: express-api-gateway
ports:
- "3000:3000"
volumes:
- ./models:/app/models
restart: always
networks:
- api-network
environment:
- USER_SERVICE_URL=http://user-service:3001

user-service:
build:
context: ./user-service
Expand All @@ -51,7 +50,6 @@ services:
- ./models:/app/models
restart: always
networks:
- user-network
- api-network

product-service:
Expand All @@ -66,7 +64,6 @@ services:
ports:
- "3002:3002"
volumes:
- ./product-service:/app
- ./models:/app/models
restart: always
networks:
Expand All @@ -86,7 +83,6 @@ services:
ports:
- "3003:3003"
volumes:
- ./cart-service:/app
- ./models:/app/models
restart: always
networks:
Expand All @@ -106,7 +102,6 @@ services:
ports:
- "3004:3004"
volumes:
- ./order-service:/app
- ./models:/app/models
restart: always
networks:
Expand All @@ -118,7 +113,6 @@ networks:
api-network:
name: api-network
external: true
user-network:

volumes:
user-db-data:
Loading

0 comments on commit 90553bc

Please sign in to comment.