Skip to content

Commit

Permalink
Update docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sshresthadh authored Jan 12, 2025
1 parent d9916e3 commit 92680da
Showing 1 changed file with 9 additions and 63 deletions.
72 changes: 9 additions & 63 deletions all_in_docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,17 @@
version: '3.7'

---
version: '2'
services:
frontend:
image: imageName
build: ./client/
restart: always
ports:
- 3000:80
deploy:
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 2
delay: 10s
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
placement:
constraints:
- node.role == worker
networks:
- overlay_network

backend:
image: imageName
build: ./server/
restart: always
deploy:
replicas: 2
restart_policy:
condition: on-failure
update_config:
parallelism: 2
delay: 10s
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
placement:
constraints:
- node.role == worker
networks:
- overlay_network
ports:
- 3001:3001

mysql:
image: mysql/mysql-server:5.7
Expand All @@ -57,29 +21,11 @@ services:
MYSQL_DATABASE: employeeSystem
MYSQL_ROOT_PASSWORD: mauFJcuf5dhRMQrjj
MYSQL_ROOT_HOST: '%'
ports:
- 3306:3306
volumes:
- ./init.sql:/data/application/init.sql
- mysql_server_data:/var/lib/mysql
deploy:
replicas: 1
restart_policy:
condition: on-failure
resources:
limits:
cpus: '0.50'
memory: 1G
reservations:
cpus: '0.25'
memory: 512M
placement:
constraints:
- node.role == manager
networks:
- overlay_network

volumes:
volumes:
mysql_server_data:

networks:
overlay_network:
driver: overlay

0 comments on commit 92680da

Please sign in to comment.