You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
2.0 KiB

version: "3.4"
services:
proxy:
image: nginx:1.17.9-alpine
deploy:
mode: replicated
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
replicas: 4
placement:
# max_replicas_per_node: 1
constraints:
- node.labels.group==server
ports:
- "8080:80"
- "9443:443"
volumes:
- /home/user/project_cloud/proxy.conf:/etc/nginx/conf.d/default.conf
- /home/user/project_cloud/public.crt:/etc/nginx/public.crt
- /home/user/project_cloud/private.key:/etc/nginx/private.key
networks:
- covid_19
mysql_database:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD:
ports:
- 3306:3306
volumes:
- mysql_database:/var/lib/mysql
adminer_container:
image: adminer:latest
environment:
ADMINER_DEFAULT_SERVER: mysql_db_container
ports:
- 6060:8080
apache2_application:
image: my_apache:0.1
deploy:
mode: replicated
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
replicas: 4
placement:
# max_replicas_per_node: 1
constraints:
- node.labels.group==server
volumes:
- /home/user/project_cloud/application_php/www:/var/www/html
ports:
- 90:80
networks:
- covid_19
apache2_client:
image: my_apache:0.1
deploy:
mode: replicated
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
replicas: 4
placement:
# max_replicas_per_node: 1
constraints:
- node.labels.group==server
volumes:
- /home/user/project_cloud/client/www:/var/www/html
ports:
- 91:80
networks:
- covid_19
volumes:
mysql_database:
networks:
covid_19:
driver: overlay
secrets:
secret_key:
external: true
access_key:
external: true