update,
This commit is contained in:
92
tsc1877/task1/project/docker-compose.yml
Normal file
92
tsc1877/task1/project/docker-compose.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
volumes:
|
||||
admin_node_modules:
|
||||
admin_dev_node_modules:
|
||||
|
||||
services:
|
||||
admin:
|
||||
image: node:18-buster-slim
|
||||
restart: always
|
||||
volumes:
|
||||
- ./admin:/usr/bin/app
|
||||
- admin_node_modules:/usr/bin/app/node_modules
|
||||
command: sleep infinity
|
||||
working_dir: /usr/bin/app
|
||||
|
||||
ports:
|
||||
- 80:3000
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 20M
|
||||
|
||||
admin_dev:
|
||||
image: node:18-buster-slim
|
||||
restart: always
|
||||
volumes:
|
||||
- ./admin_dev:/usr/bin/app
|
||||
- admin_dev_node_modules:/usr/bin/app/node_modules
|
||||
command: sleep infinity
|
||||
working_dir: /usr/bin/app
|
||||
|
||||
ports:
|
||||
- 50005:3000
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 20M
|
||||
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
# container_name: db
|
||||
restart: always
|
||||
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: my_secret_password
|
||||
MYSQL_DATABASE: app_db
|
||||
MYSQL_USER: db_user
|
||||
MYSQL_PASSWORD: db_user_pass
|
||||
ports:
|
||||
- '6033:3306'
|
||||
volumes:
|
||||
- ./volumes/mysql:/var/lib/mysql
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 20M
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
# container_name: pma
|
||||
restart: always
|
||||
links:
|
||||
- mysql
|
||||
environment:
|
||||
PMA_HOST: mysql
|
||||
PMA_PORT: 3306
|
||||
PMA_ARBITRARY: 1
|
||||
ports:
|
||||
- 8080:80
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.20'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 20M
|
Reference in New Issue
Block a user