I prepared a docker image on Docker Hub. If you don't want to installations requirements, you can use it quickly docker image.
Image Source: https://hub.docker.com/repository/docker/erensayar/todoapp
-
First Of All Get Docker https://docs.docker.com/engine/install/ubuntu/#install-from-a-package (I paste for linux setup. And this method install docker with downloaded packages. If you want you can use another way)
-
Download docker image.
docker pull erensayar/todoapp:latest
-
Then Run:
$ sudo docker container run -p <your-choosed-port>:8081 --rm erensayar/todoapp
Backend Requirements
- JDK 1.8 http://jdk.java.net/java-se-ri/8-MR3 (OpenJDK)
- Maven https://maven.apache.org/download.cgi
Frontend Ruquirements:
- Node.js https://nodejs.org/en/download/
1.You can use package manager:
Java:
$ sudo apt-get update \
&& sudo apt-get install openjdk-8-jdk \
&& java -version
Maven:
$ sudo apt install maven \
&& mvn -version
2.Manuel Setup:
-
Get JDK And Maven compressed files.
-
Then extract.
-
Give name without space to files. (Java File: OpenJDK-1.8 | Maven: Maven)
-
Then move files to any where permanently.
-
Last thing you should set PATH and ENVIRONMENT VARIABLE:
-
Open terminal and open .bashrc file with any editor for edit this file. (I choose gedit for this example)
$ gedit .bashrc
-
And then add this lines.
Maven:
export M2_HOME=/${PATH}/${MAVEN-MAIN-DIRECTORY} export PATH=$M2_HOME/bin:$PATH
Java:
export JAVA_HOME=/${PATH}/${JAVA-MAIN-DIRECTORY} export PATH=$JAVA_HOME/bin:$PATH
-
-
Get application source code with Git. (You should have git program for run this command or you can just download source code from browser)
$ git clone https://github.com/erensayar/ToDoApp.git $ cd ToDoApp
-
Compilation and build with maven.
$ mvn package
-
Now we have a jar file.
java -jar target/ToDoApp.jar
- Server Port : 8081
- Swagger Directory : /swagger-ui.html
- H2 Console Directory : /h2-console/login
- H2 Console Configurations:
- User Name: sa
- Datasource.url: jdbc:h2:mem:testdb
- Application Some User Name And Password For Authentication:
- eren P4ssword
- user1 P4ssword
- user2 P4ssword...
You can find .har and .json file for import to request program. (Authorization information is embedded some files. Check the header.)
Directory: Backend > Requests
Some Requests:
-
Switch to project directory to access dockerfile and then create docker image.
$ sudo docker image build -t <image-name> .
-
For run this created image. Run a container.
$ sudo docker container run -p <your-choose-port>:8081 --rm <image-name>
PS: Frontend NOT FINISHED, I will continue.
PS: You don't have to get node.js if you will not developing front side. I already got React App build and put to backend's resource.
PS: If you will developing front side, delete old builded files from backend side (resource/static) then move new builded files same directory.
- Language Bug From Backend
- Home Page Get Data, Send Data
- Home Page Responsive Design
- Turkish Font Character Problem