-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
87 lines (80 loc) · 2.42 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
version: "3.8"
services:
# privnote-vpn:
# container_name: privnote-vpn
# restart: always
# image: qmcgaw/gluetun
# cap_add:
# - NET_ADMIN
# environment:
# - VPN_SERVICE_PROVIDER=mullvad
# - VPN_TYPE=wireguard
# - WIREGUARD_PRIVATE_KEY=${WIREGUARD_PRIVATE_KEY}
# - WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES}
# - SERVER_CITIES=${SERVER_CITIES}
privnote-tor:
container_name: privnote-tor
# network_mode: service:privnote-vpn
image: goldy/tor-hidden-service:latest
depends_on:
- privnote-web
networks:
- proxy
environment:
SERVICE2_TOR_SERVICE_VERSION: '3'
# hello and again will share the same onion v3 address
SERVICE2_TOR_SERVICE_HOSTS: 80:privnote-web:3000
# tor v3 address private key base 64 encoded
SERVICE2_TOR_SERVICE_KEY: ${TOR_SERVICE_KEY}
privnote-web:
container_name: privnote-web
hostname: privnote-web
build:
context: web/
dockerfile: Dockerfile
restart: always
ports:
- "127.0.0.1:3000:3000"
expose:
- 3000
networks:
- proxy
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.privnote-web.rule=Host(`privnote.coding.global`)'
- 'traefik.http.middlewares.onionHeader.headers.customresponseheaders.Onion-Location=http://pnotegqaaijd3dpqesxfjplwbxk2z6jnaoha7gqalfwiaajqqtsilcqd.onion/'
- 'traefik.http.routers.privnote-web.middlewares=onionHeader@docker'
- 'traefik.http.routers.privnote-web.entrypoints=websecure'
- 'traefik.http.routers.privnote-web.tls.certresolver=letsencrypt'
- 'traefik.http.services.privnote-web.loadbalancer.server.port=3000'
privnote-server:
container_name: privnote-server
hostname: privnote-server
build:
context: server/
dockerfile: Dockerfile
restart: always
expose:
- 4000
depends_on:
- privnote-db
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}
networks:
- proxy
privnote-db:
container_name: privnote-db
hostname: privnote-db
image: postgres:alpine
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- proxy
networks:
proxy:
external: false
name: proxy