Skip to content

Commit

Permalink
update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouop0 committed Aug 6, 2024
1 parent 8918beb commit 5f49034
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ deploy/pg-data
mysql1
meili_data
postgres
mysql

40 changes: 19 additions & 21 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@ version: "3"

services:

postgres:
container_name: postgres-game
image: postgres:latest
mysql:
container_name: mysql
image: mysql:8.0.28
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
MYSQL_ROOT_PASSWORD: "root"
ports:
- "5435:5432"
- "3367:3306"
volumes:
- ./pg-data:/var/lib/postgresql/data
- ./mysql/datadir:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql

node1:
container_name: dispute-explorer-backend
image: ghcr.io/optimism-java/dispute-explorer:sha-0e9542b
image: ghcr.io/optimism-java/dispute-explorer:sha-8918beb
restart: on-failure
depends_on:
- postgres
- mysql
environment:
LOG_LEVEL: "info"
LOG_FORMAT: "console"
MYSQL_DATA_SOURCE: "root:root(127.0.0.1:3366)/dispute_explorer?charset=utf8mb4&parseTime=True&loc=Local&multiStatements=true"
MYSQL_DATA_SOURCE: "root:root@tcp(127.0.0.1:3367)/dispute_explorer?charset=utf8mb4&parseTime=True&loc=Local&multiStatements=true"
MYSQL_MAX_IDLE_CONNS: "10"
MYSQL_MAX_OPEN_CONNS: "20"
MYSQL_CONN_MAX_LIFETIME: "3600"
Expand All @@ -37,6 +36,9 @@ services:
meiliSearch:
container_name: meilisearch
image: getmeili/meilisearch:v1.8
depends_on:
- mysql
- node1
environment:
- MEILI_MASTER_KEY=123456
ports:
Expand All @@ -47,16 +49,12 @@ services:
meiliSync:
platform: linux/x86_64
image: long2ice/meilisync:sha-fc1877d
depends_on:
- mysql
- node1
- meiliSearch
volumes:
- ./config.yml:/meilisync/config.yml
network_mode: host

mysql1:
container_name: mysql1
image: mysql:8.0.28
environment:
MYSQL_ROOT_PASSWORD: "root"
ports:
- "3366:3306"
volumes:
- ./mysql1/datadir:/var/lib/mysql

7 changes: 7 additions & 0 deletions deploy/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Create Database If Not Exists dispute_explorer Character Set UTF8;
USE dispute_explorer;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

SET GLOBAL binlog_format = 'ROW';

0 comments on commit 5f49034

Please sign in to comment.