Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
91 lines (82 loc) · 2.6 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
91 lines (82 loc) · 2.6 KB
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
89
90
91
# Docker setup for cherrypy server
#
# pip-volume is used for persistent python environment. Removing will make a
# stateless container, which will download and install python packages on every
# restart.
#
# Before starting for the first time:
# touch acme.json
# chmod 600 acme.json
#
# version: '3.3'
# networks:
# traefik:
# services:
# init:
# image: python:3.10
# volumes:
# - pip-volume:/usr/local/lib/python3.10/site-packages
# - ./server:/server
# working_dir: /server
# command: pip install -r requirements.txt
# traefik:
# image: traefik:v2.2
# restart: unless-stopped
# container_name: traefik
# networks:
# - traefik
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - "./traefik.toml:/traefik.toml"
# - "./acme.json:/acme.json"
# - "./usersfile:/usersfile"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
# labels:
# - "traefik.http.middlewares.csrfHeader.headers.customrequestheaders.X-Forwarded-Proto=https"
# - "traefik.http.middlewares.csrfHeader.headers.customrequestheaders.X-Forwarded-Port=443"
# - "traefik.http.middlewares.csrfHeader.headers.customrequestheaders.X-Forwarded-Ssl=on"
# cherrypy:
# image: python:3.10
# restart: always
# volumes:
# - pip-volume:/usr/local/lib/python3.10/site-packages
# - ./server:/server
# working_dir: /server
# command: python3 inspire.py
# depends_on:
# init:
# condition: service_completed_successfully
# networks:
# - traefik
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.cherrypy.rule=Host(`inspire.storyweb.info`)"
# - "traefik.http.routers.cherrypy.entrypoints=websecure"
# - "traefik.http.routers.cherrypy.tls=true"
# - "traefik.http.routers.cherrypy.tls.certresolver=leresolver"
# - "traefik.http.services.cherrypy.loadbalancer.server.port=8080"
# volumes:
# pip-volume:
volumes:
pg-data:
services:
postgres:
image: postgres:15-alpine
ports:
- 127.0.0.1:5432:5432
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: secret
POSTGRES_DB: user
volumes:
- pg-data:/var/lib/postgresql/data
server:
build: ./server
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./server/config.json:/app/config.json
- ./server/static:/app/static