Skip to content

Commit

Permalink
fix docker
Browse files Browse the repository at this point in the history
  • Loading branch information
counters committed Oct 15, 2021
1 parent f079738 commit 30656d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN mkdir -p /app
WORKDIR /app
#CMD /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar --createtable
#ENTRYPOINT /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar
ENTRYPOINT if test ! -f "initialized.flag"; then /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar --createtable; touch initialized.flag; fi && /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar
#ENTRYPOINT if test ! -f "initialized.flag"; then /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar --createtable; touch initialized.flag; fi && /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar
ENTRYPOINT /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar --createtable && /usr/bin/java -Dfile.encoding=UTF-8 -jar app.jar
EXPOSE 8010
6 changes: 2 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
version: '3.1'

volumes:
# notify_db:
notify_db:
external: true
# external: true
influxdb-storage:

services:
db:
image: mariadb
# container_name: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
Expand All @@ -29,7 +27,6 @@ services:
dockerfile: Dockerfile
ports:
- "${APP_PORT}:8010"
# network_mode: host
depends_on:
- db
- redis
Expand All @@ -41,6 +38,7 @@ services:
restart: always
influxdb:
image: influxdb:2.0
restart: always
ports:
- '${INFLUXDB_PORT}:8086'
volumes:
Expand Down
8 changes: 0 additions & 8 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ __Install__
- Download and unpack repository `https://github.com/chain-action/http-notification/tree/contest`

- Go to directory ./docker `cd ./docker`
- Create Docker Volumes for Mysql Data Persistent Storage
```shell
docker volume create --driver local --opt type=none \
--opt device=/home/user/notify_db \
--opt o=bind notify_db
#docker volume create --name=notify_db # For Windows or build via Docker Desktop
```
*_`/home/user/notify_db` replace for full path on your system_
- Start the docker application (change ports in the `.env` file if they are busy)
```shell
docker-compose up --build -d
Expand Down

0 comments on commit 30656d9

Please sign in to comment.