You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/09 06:22:02 UTC

[GitHub] [shardingsphere] misselvexu commented on a diff in pull request #17177: Update outdated examples under examples/docker

misselvexu commented on code in PR #17177:
URL: https://github.com/apache/shardingsphere/pull/17177#discussion_r867664971


##########
examples/docker/shardingsphere-proxy/sharding/docker-compose.yml:
##########
@@ -17,40 +17,40 @@
 
 version: '3'
 services:
-  mysql:
-    ## for different MySQL version, you could get more at here : https://hub.docker.com/_/mysql?tab=tags
-    image: "mysql:5.7"
-    ## port binding to 3306, you could change to 13306:3306 or any other available port you want
+  postgres:
+    ## for different postgres version, you could get more at here : https://hub.docker.com/_/postgres?tab=tags
+    image: "postgres:latest"
+    ## port binding to 5432, you could change to 15432:5432 or any other available port you want
     ports:
-      - "3306:3306"
-    container_name: shardingsphere-example-mysql
-    ## launch MySQL without password
-    ## you could access MySQL like `mysql -h127.0.0.1 -P3306 -uroot`
-    ## if you insist to access MySQL with password, remove `MYSQL_ALLOW_EMPTY_PASSWORD=yes` and then use MYSQL_ROOT_PASSWORD argument
-    #  - MYSQL_ROOT_PASSWORD=root
+      - "5432:5432"
+    container_name: shardingsphere-example-postgres
+    ## launch Postgres without password
+    ## you could access Postgres like `psql -d your_database_name -h 127.0.0.1 -U root -p 5432 -W`
     environment:
-     - MYSQL_ALLOW_EMPTY_PASSWORD=yes
-    ## copy the manual_schema.sql to /docker-entrypoint-initdb.d/ . this will init the sql file when the MySQL in container start up
+     - TZ=Asia/Shanghai
+     - POSTGRES_USER=postgres
+     - POSTGRES_PASSWORD=postgres
+    ## copy the manual_schema.sql to /docker-entrypoint-initdb.d/ . this will init the sql file when the Postgres in container start up
     volumes:
       - ../../../src/resources/manual_schema.sql:/docker-entrypoint-initdb.d/manual_schema.sql
 
   proxy:
     ## get more versions of proxy here : https://hub.docker.com/r/apache/sharding-proxy/tags
-    image: "apache/sharding-proxy:4.1.1"
+    image: "apache/sharding-proxy:latest"

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org