-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '0.7.x' of github.com:chennqqi/godnslog into 0.7.x
- Loading branch information
Showing
5 changed files
with
61 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,32 @@ | ||
version: "3.6" #docker version>=18.02.0+ | ||
version: "3.3" #docker version>=18.02.0+ | ||
|
||
services: | ||
godnslog: | ||
container_name: godnslog | ||
depends_on: | ||
- db | ||
image: sort/godnslog | ||
command: serve -domain yourdomain.com -4 x.x.x.x -dsn 'mysql://' | ||
container_name: godnslog | ||
command: serve -domain yourdomain.com -4 x.x.x.x -driver mysql -dsn 'godnslog:godnslog123@tcp(db:3306)/godnslog?charset=utf8' | ||
ports: | ||
- "127.0.0.1:10080:8080" # reverseProxy | ||
- "8080:8080" # reverseProxy | ||
- "53:53/udp" | ||
environment: | ||
- GIN_MODE=release | ||
restart: always | ||
depends_on: | ||
- db | ||
networks: | ||
- overlay | ||
|
||
db: | ||
image: mysql | ||
image: mysql:5.7 | ||
container_name: godnslog-mysql | ||
restart: always | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: example | ||
MYSQL_USER: | ||
MYSQL_PASSWORD: | ||
MYSQL_DATABASE: | ||
networks: | ||
- overlay | ||
MYSQL_ROOT_PASSWORD: godnslogPASS | ||
MYSQL_USER: godnslog | ||
MYSQL_PASSWORD: godnslog123 | ||
MYSQL_DATABASE: godnslog | ||
MYSQL_ROOT_HOST: "0.0.0.0" | ||
volumes: | ||
- db-data:/var/lib/mysql/data | ||
- godnslog-mysql-data:/var/lib/mysql | ||
#- ./mysql:/docker-entrypoint-initdb.d/ | ||
|
||
networks: | ||
overlay: | ||
|
||
volumes: | ||
godnslog-data: | ||
godnslog-mysql-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: "3.3" #docker version>=18.02.0+ | ||
|
||
services: | ||
init-godnslog: | ||
image: busybox | ||
container_name: busybox | ||
command: /bin/sh -c 'touch /app/db/godnslog.db && ls /app/db && chown -R 1000:1000 /app/db' | ||
restart: "no" | ||
volumes: | ||
- godnslog-sqlite-data:/app/db | ||
|
||
godnslog: | ||
image: sort/godnslog | ||
container_name: godnslog | ||
restart: always | ||
environment: | ||
- GIN_MODE=release | ||
ports: | ||
- "8080:8080" # 反向代理模式 | ||
- "53:53/udp" | ||
restart: always | ||
command: serve -domain example.com -4 100.100.100.100 -dsn 'file:/app/db/godnslog.db?cache=shared&mode=rwc' | ||
volumes: | ||
- godnslog-sqlite-data:/app/db # 持久化存储 | ||
|
||
volumes: | ||
godnslog-sqlite-data: |
This file was deleted.
Oops, something went wrong.