Skip to content

Commit

Permalink
Merge pull request #5 from Samarth-HP/add-start-script
Browse files Browse the repository at this point in the history
Add start script
  • Loading branch information
choxx authored Jan 25, 2023
2 parents 8b870ea + e0c0a3a commit f7702fc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
!/libs/**
!/src/**
!pom.xml
!start.sh

# Ignore unnecessary files inside allowed directories
# This should go after the allowed directories
**/*~
**/*.log
**/.DS_Store
**/Thumbs.db
**/Thumbs.db
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt install curl -y
ENV HOME=/home/app
WORKDIR $HOME
COPY --from=build $HOME/target/*.jar app.jar
COPY ./start.sh .

EXPOSE 8080
ENTRYPOINT ["java","-jar","app.jar"]

ENTRYPOINT ["bash","start.sh"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ Move to this folder for all other commands.

### 3. Set it up :arrow_up:

First, You need to add the required hosts to your `/etc/hosts` file as mentioned [here](https://mgov.gov.in/PushSMS_Q1) on `mgov.gov.in` website.

_Note: These ip addresses are subject to change; so please ensure adding the correct ip addresses. You can use ping utility to identify the ip of a host on your local machine `ping msdgweb.mgov.gov.in`._

```
164.100.129.128 mgov.gov.in
164.100.129.141 msdgweb.mgov.gov.in
```

Run the following commands to see that _your local copy_ has a reference to _your forked remote repository_ in GitHub :octocat:

```sh
Expand Down
9 changes: 9 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

curl -O https://mgov.gov.in/Resources/TechnicalArticles/msdgweb-mgov-gov-in.crt

eval "keytool -noprompt -storepass changeit -import -alias cdackey -keystore /usr/local/openjdk-11/lib/security/cacerts -file /home/app/msdgweb-mgov-gov-in.crt"

echo "Added certificate"

java -jar app.jar

0 comments on commit f7702fc

Please sign in to comment.