1
+ # docker-compose.yml
2
+ version : " 3.7"
3
+
4
+ secrets :
5
+ # paths assume the .secrets folder is sibling depth to folder where docker-compose resides
6
+ DB_ROOT_PWD :
7
+ file : ../.secrets/db_root_pwd.txt
8
+ MYSQL_PWD :
9
+ file : ../.secrets/mysql_pwd.txt
10
+
11
+ # networks:
12
+ # npm-bridge: # arbitrary name
13
+ # driver: bridge
14
+
15
+ services :
16
+ mariadb :
17
+ image : ahgraber/mariadb-aria:test
18
+ container_name : mariadb
19
+ secrets :
20
+ - DB_ROOT_PWD
21
+ - MYSQL_PWD
22
+ # networks:
23
+ # - npm-bridge
24
+ # ports:
25
+ # - 3306:3306
26
+ environment :
27
+ # MYSQL_ROOT_PASSWORD: "npm"
28
+ MYSQL_ROOT_PASSWORD__FILE : /run/secrets/DB_ROOT_PWD
29
+ MYSQL_DATABASE : " npm"
30
+ MYSQL_USER : " npm"
31
+ # MYSQL_PASSWORD: "npm"
32
+ MYSQL_PASSWORD__FILE : /run/secrets/MYSQL_PWD
33
+ volumes :
34
+ - ./data/mysql:/var/lib/mysql
35
+ # - npm-mount:/var/lib/mysql
36
+ # restart: unless-stopped
37
+
38
+ npm :
39
+ build :
40
+ context : .
41
+ dockerfile : ./Dockerfile
42
+ # args:
43
+ # TARGETPLATFORM: arm64v8
44
+ image : nginx-proxy-manager:test # provide a name and tag for the image
45
+ container_name : npm
46
+ secrets :
47
+ - MYSQL_PWD
48
+ # networks:
49
+ # - npm-bridge
50
+ ports :
51
+ - 8080:80
52
+ - 8443:443
53
+ - 8888:81
54
+ environment :
55
+ DISABLE_IPV6 : ' true'
56
+ DB_MYSQL_HOST : " mariadb"
57
+ DB_MYSQL_PORT : 3306
58
+ DB_MYSQL_NAME : " npm"
59
+ DB_MYSQL_USER : " npm"
60
+ # DB_MYSQL_PASSWORD: "npm"
61
+ DB_MYSQL_PASSWORD__FILE : /run/secrets/MYSQL_PWD
62
+ # DB_MYSQL_PASSWORD: "sqlL3tm3in"
63
+ volumes :
64
+ - ./data/npm:/data
65
+ - ./data/letsencrypt:/etc/letsencrypt
66
+ # - npm-mount:/data
67
+ # - letsencrypt-mount:/etc/letsencrypt
68
+ depends_on :
69
+ - mariadb
70
+ # restart: unless-stopped
71
+
72
+ # ## https://stackoverflow.com/questions/45282608/how-to-directly-mount-nfs-share-volume-in-container-using-docker-compose-v3
73
+ # volumes:
74
+ # npm-mount:
75
+ # driver: local
76
+ # driver_opts:
77
+ # type: nfs
78
+ # o: nfsvers=4,addr=10.2.1.1,rw,retry=1,soft,nolock
79
+ # device: ":/npm"
80
+ # letsencrypt-mount:
81
+ # driver: local
82
+ # driver_opts:
83
+ # type: nfs
84
+ # o: nfsvers=4,addr=10.2.1.1,rw,retry=1,soft,nolock
85
+ # device: ":/letsencrypt"
86
+
0 commit comments