Skip to content

Commit

Permalink
postgres database version is upgrade to 15.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgd009xcd committed Oct 1, 2023
1 parent 2899894 commit e6f329b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,52 +43,50 @@ URL: http://localhost:8110/

### install & setup

1. If your os does not have docker, Please read: https://docs.docker.com/get-docker/
<PRE> e.g. # yum install docker</PRE>
1. If your os does not have docker, Please read: https://docs.docker.com/get-docker/ and follow the instructions.


2. If your os does not have docker-compose command, Please read: https://docs.docker.com/compose/install/
<PRE>
e.g. $ su -
# curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
</PRE>
3. download Source code WEBSAMPSQLINJ-N.N.N.tar.gz file from RELEASE page, and extract .tar.gz file, and create apache_php_pgsql/docker/db/data folder for database persistence
1. If you does not have "docker compose" tool, Please read: https://docs.docker.com/compose/install/
1) Check whether did you get the "docker compose" tool
<PRE>
$ docker compose
docker: 'composes' is not a docker command. <- no installed
..OR...
Usage: docker compose [OPTIONS] COMMAND <- You have it. installed.
</PRE>
2) if you don't have compose tool, read https://docs.docker.com/compose/install/ carefully, and follow the instructions.

1. download Source code WEBSAMPSQLINJ-N.N.N.tar.gz file from RELEASE page, and extract .tar.gz file, and create apache_php_pgsql/docker/db/data folder for database persistence
<PRE>
e.g. version number N.N.N is 0.5.0
$ tar xzvf WEBSAMPSQLINJ-0.5.0.tgz
$ cd WEBSAMPSQLINJ-0.5.0/apache_php_pgsql/docker/db
$ mkdir data

</PRE>
</PRE>
or clone git and create dir.
<PRE>
$ git clone https://github.com/gdgd009xcd/WEBSAMPSQLINJ.git
$ cd WEBSAMPSQLINJ/apache_php_pgsql/docker/db
$ mkdir data

</PRE>

### start application
1. Start docker using your OS method
1. if your os did'nt start docker, Start docker using your OS method
<PRE>
e.g. (on CentOS 7)
$ su -
# systemctl start docker
e.g. (on Ubuntu 22.04)
$ sudo systemctl start docker
</PRE>

2. In apache_php_pgsql dir, execute following docker-compose command.
1. In apache_php_pgsql dir, execute following docker-compose command.
<PRE>
# cd WEBSAMPSQLINJ/apache_php_pgsql
# docker-compose up -d
$ cd WEBSAMPSQLINJ/apache_php_pgsql
$ sudo docker compose up -d
</PRE>

### stop application

1. In apache_php_pgsql dir, execute following docker-compose command.
<PRE>
# cd WEBSAMPSQLINJ/apache_php_pgsql
# docker-compose down
$ cd WEBSAMPSQLINJ/apache_php_pgsql
$ sudo docker compose down
</PRE>

### URL of application
Expand Down
1 change: 1 addition & 0 deletions apache_php_pgsql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
depends_on:
- db
db:
image: postgres:15
build: ./docker/db/
environment:
POSTGRES_PASSWORD: password
Expand Down
2 changes: 1 addition & 1 deletion apache_php_pgsql/docker/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM postgres:9.3
FROM postgres:15
ENV LANG en_US.utf8

0 comments on commit e6f329b

Please sign in to comment.