Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
artur rocks committed Oct 21, 2024
2 parents b8e8e04 + b17702b commit f5b4ce8
Show file tree
Hide file tree
Showing 98 changed files with 4,683 additions and 717 deletions.
61 changes: 61 additions & 0 deletions .docker-compose/docker-compose.h2.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: '3'

services:

fits:
image: artourkin/fits-web:main
container_name: fits
env_file: ../.env
networks:
- web
restart: unless-stopped
ports:
- 8081:8080


rest:
container_name: rest
build:
context: ..
dockerfile: ../Dockerfile
env_file: ../.env
networks:
- web
restart: unless-stopped
deploy:
replicas: 1
ports:
- 8082:8080
depends_on:
- fits
- db-docker


web:
build:
context: ..
dockerfile: ../web/Dockerfile
container_name: web
env_file: ../.env
networks:
- web
restart: unless-stopped
ports:
- 8080:3000


db-docker:
image: oscarfonts/h2
container_name: db-docker
env_file: ../.env
environment:
- H2_OPTIONS=-ifNotExists
networks:
- web
restart: unless-stopped
ports:
- 1521:1521
- 81:81

networks:
web:
179 changes: 179 additions & 0 deletions .docker-compose/docker-compose.mysql.cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
version: '3'

services:

fits:
build:
context: ..
dockerfile: ../fits/Dockerfile
container_name: fits
env_file: ../.env
networks:
- web
restart: unless-stopped
ports:
- 8081:8080

rest:
build:
context: ..
dockerfile: ../Dockerfile
env_file: ../.env
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql-router:6446/fitsinn
- DB_SELECTOR=mysql
networks:
- web
restart: unless-stopped
deploy:
replicas: 3
depends_on:
- fits
- mysql-router

web:
build:
context: ..
dockerfile: ../web/Dockerfile.dev
container_name: web
env_file: ../.env
networks:
- web
restart: unless-stopped
depends_on:
- rest
ports:
- 8080:3000


adminer:
image: adminer
container_name: adminer
env_file: ../.env
restart: unless-stopped
networks:
- web
ports:
- 8090:8080

mysql-server-1:
container_name: mysql-server-1
env_file:
- ../config/mysql-cluster/mysql-server.env
image: mysql/mysql-server:8.0.12
networks:
- web
command:
[
"mysqld",
"--server_id=1",
"--binlog_checksum=NONE",
"--gtid_mode=ON",
"--enforce_gtid_consistency=ON",
"--log_bin",
"--log_slave_updates=ON",
"--master_info_repository=TABLE",
"--relay_log_info_repository=TABLE",
"--transaction_write_set_extraction=XXHASH64",
"--user=mysql",
"--skip-host-cache",
"--skip-name-resolve",
"--default_authentication_plugin=mysql_native_password",
]

mysql-server-2:
container_name: mysql-server-2
env_file:
- ../config/mysql-cluster/mysql-server.env
image: mysql/mysql-server:8.0.12
networks:
- web
command:
[
"mysqld",
"--server_id=2",
"--binlog_checksum=NONE",
"--gtid_mode=ON",
"--enforce_gtid_consistency=ON",
"--log_bin",
"--log_slave_updates=ON",
"--master_info_repository=TABLE",
"--relay_log_info_repository=TABLE",
"--transaction_write_set_extraction=XXHASH64",
"--user=mysql",
"--skip-host-cache",
"--skip-name-resolve",
"--default_authentication_plugin=mysql_native_password",
]


mysql-server-3:
container_name: mysql-server-3
env_file:
- ../config/mysql-cluster/mysql-server.env
image: mysql/mysql-server:8.0.12
networks:
- web
command:
[
"mysqld",
"--server_id=3",
"--binlog_checksum=NONE",
"--gtid_mode=ON",
"--enforce_gtid_consistency=ON",
"--log_bin",
"--log_slave_updates=ON",
"--master_info_repository=TABLE",
"--relay_log_info_repository=TABLE",
"--transaction_write_set_extraction=XXHASH64",
"--user=mysql",
"--skip-host-cache",
"--skip-name-resolve",
"--default_authentication_plugin=mysql_native_password",
]

mysql-shell:
container_name: mysql-shell
env_file:
- ../config/mysql-cluster/mysql-shell.env
image: neumayer/mysql-shell-batch
networks:
- web
volumes:
- ./mysql-cluster/scripts/:/scripts/
depends_on:
- mysql-server-1
- mysql-server-2
- mysql-server-3

mysql-router:
container_name: mysql-router
env_file:
- ../config/mysql-cluster/mysql-router.env
image: mysql/mysql-router:8.0
networks:
- web
ports:
- 3306:6446
depends_on:
- mysql-server-1
- mysql-server-2
- mysql-server-3
- mysql-shell
restart: on-failure

nginx:
image: nginx
container_name: nginx
env_file: ../.env
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8082:80
networks:
- web
depends_on:
- rest

networks:
web:
89 changes: 89 additions & 0 deletions .docker-compose/docker-compose.mysql.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
version: '3'

services:

fits:
build:
context: ..
dockerfile: ../fits/Dockerfile
container_name: fits
env_file: ../.env
networks:
- web
restart: unless-stopped
ports:
- 8081:8080

rest:
build:
context: ..
dockerfile: ../Dockerfile
env_file: ../.env
networks:
- web
restart: unless-stopped
environment:
- LOGGING_LEVEL_ORG_HIBERNATE_SQL=DEBUG
- SPRING_JPA_SHOW_SQL=true
- DB_SELECTOR=mysql
deploy:
replicas: 1
ports:
- 8092:8080
depends_on:
- fits
- db-docker

web:
build:
context: ..
dockerfile: ../web/Dockerfile
container_name: web
env_file: ../.env
networks:
- web
restart: unless-stopped
ports:
- 8080:3000

db-docker:
image: mysql:8.0
container_name: db-docker
env_file: ../.env
environment:
MYSQL_DATABASE: fitsinn
MYSQL_USER: user
MYSQL_PASSWORD: pass
MYSQL_ROOT_PASSWORD: pass
networks:
- web
restart: unless-stopped
ports:
- 3306:3306


adminer:
image: adminer
container_name: adminer
env_file: ../.env
restart: unless-stopped
networks:
- web
ports:
- 8090:8080

nginx:
image: nginx
container_name: nginx
env_file: ../.env
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8082:80
networks:
- web
depends_on:
- rest

networks:
web:
Loading

0 comments on commit f5b4ce8

Please sign in to comment.