-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
88 lines (76 loc) · 1.92 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
services:
# Golang Service
app:
build:
context: .
dockerfile: Dockerfile # Dockerfile to build your Golang app
ports:
- "8080:8080" # json service port
restart: always
environment:
- GO_DIRECTORY=/home/user/FreePDM
- GO_WORKDIR=/home/user/FreePDM/cmd/pdmserver
- DB_HOST=db
- DB_PORT=5432
- DB_USER=yourusername
- DB_PASSWORD=yourpassword
- DB_NAME=FreePDM
depends_on:
- db
volumes:
- ./app:/go/src/app # Mount your app source code for easier development
- ./data:/app/data
- ./logs:/app/logs
- /samba/vaultsdata:/samba/vaultsdata
networks:
- app-network
command: /app/freepdm
# PostgreSQL Database
db:
image: postgres:14
restart: always
environment:
POSTGRES_USER: yourusername
POSTGRES_PASSWORD: yourpassword
POSTGRES_DB: FreePDM
volumes:
- db_data:/var/lib/postgresql/data # Persist database data
networks:
- app-network
samba:
image: ghcr.io/servercontainers/samba:latest
restart: always
network_mode: host
cap_add:
- CAP_NET_ADMIN
environment:
TZ: Europe/Amsterdam
SAMBA_CONF_LOG_LEVEL: 3
GROUP_sambashare: 125
ACCOUNT_user: passwd
UID_user: 1000
GROUPS_user: sambashare
ACCOUNT_josh: josh1
UID_josh: 1001
GROUPS_josh: sambashare
ACCOUNT_user1: passwd1
UID_user1: 1001
GROUPS_user1: sambashare
SAMBA_VOLUME_CONFIG_vaults: |
[vaults]
path = /samba/vaults
valid users = user josh user1
guest ok = no
browseable = yes
read only = no
writeable = yes
create mask = 0660
directory mask = 2770
volumes:
- /samba/vaults:/samba/vaults
# Volumes
volumes:
db_data: # Persist data for PostgreSQL
# Networks
networks:
app-network: # Shared network for all services