Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology compose. #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions Unifi Network Application - Synology/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: unifi
services:
unifi-db:
container_name: unifi-mongo-db
image: docker.io/mongo:3.6
configs:
- source: init-mongo.js
target: /docker-entrypoint-initdb.d/init-mongo.js
environment:
- PGID=1000
- PUID=1000
- TZ=Etc/UTC
ports:
- target: 27017
published: "27017"
protocol: tcp
restart: unless-stopped
volumes:
- type: bind
source: ./db
target: /data/db
networks:
- unifi-bridge
privileged: false
unifi-network-application:
container_name: unifi-network-application
depends_on:
unifi-db:
condition: service_started
environment:
- MONGO_DBNAME=unifi-db
- MONGO_HOST=unifi-db
- MONGO_PASS=pass
- MONGO_PORT=27017
- MONGO_USER=unifi
- PGID=1000
- PUID=1000
- TZ=Etc/UTC
image: lscr.io/linuxserver/unifi-network-application:latest
ports:
- target: 8443
published: "8443"
protocol: tcp
- target: 3478
published: "3478"
protocol: udp
- target: 10001
published: "10001"
protocol: udp
- target: 8080
published: "8080"
protocol: tcp
# - target: 1900 #optional
# published: "1900"
# protocol: udp
- target: 8843 #optional
published: "8843"
protocol: tcp
- target: 8880 #optional
published: "8880"
protocol: tcp
- target: 6789 #optional
published: "6789"
protocol: tcp
- target: 5514 #optional
published: "5514"
protocol: udp
restart: unless-stopped
volumes:
- type: bind
source: ./appdata
target: /config
networks:
- unifi-bridge
privileged: false

networks:
unifi-bridge:
driver: bridge

configs:
init-mongo.js:
file: ./init-mongo.js
2 changes: 2 additions & 0 deletions Unifi Network Application - Synology/init-mongo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
db.getSiblingDB("unifi-db").createUser({user: "unifi", pwd: "pass", roles: [{role: "dbOwner", db: "unifi-db"}]});
db.getSiblingDB("unifi-db_stat").createUser({user: "unifi", pwd: "pass", roles: [{role: "dbOwner", db: "unifi-db_stat"}]});
25 changes: 25 additions & 0 deletions Unifi Network Application - Synology/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Unifi Network Application - Synology

### Notes

Be weary of existing ports. `1900` has been commented out in the compose file.

### Instructions

1. Create the folders `db` and `appdata` like so:

```markdown
├── docker
│ ├── unifi
│ │ ├── db
│ │ ├── appdata
```

2. Upload/add the `init-mongo.js`
3. Create a new project with the name `unifi` and the respective path.
4. Selecting the source as 'Create docker-compose.yml', paste the contents of the `docker-compose.yml` and click 'Next'.
5. Wait a few minutes for the unifi-network-application to initialize, dashboard will be available on port 8443.

### After install

See the other (Generic) readmes for help.