Mercurial > Pritunl-Fake-API
comparison docker/api-only/docker-compose.yml @ 0:b51518614818 default tip
New Files
author | Pluto <meokcin@gmail.com> |
---|---|
date | Tue, 03 Sep 2024 15:57:25 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b51518614818 |
---|---|
1 # Runs this API, either on port 80 or behind Traefik, either on docker swarm or single daemon. | |
2 # Choose the right configuration for you and comment out the other. | |
3 # Read the comments carefully. | |
4 # | |
5 # | |
6 # In case you run behind Traefik, you need to setup the traefik router HOST | |
7 # You need correctly setup traefik and docker network (here called proxy_external) | |
8 # | |
9 # /!\ /!\ Make sure the mount volumes match correctly. /!\ /!\ | |
10 # | |
11 # The first volume is the path to the www folder from the root of this repo. | |
12 # The path shall be a full path, or be next to this docker-compose.yml file. | |
13 # No parent folder navigation like `../../../` is allowed by docker. | |
14 # | |
15 # -> Easy solution: | |
16 # Once you have cloned this repo, you shall move this docker-compose.yml file to the root of the repo. | |
17 # | |
18 # The second volume is the path to the nginx server config file. | |
19 # This needs the commited nginx server config (or your own adapted version) to work properly. | |
20 # See the file `<repo_root>/docker/api-only/conf.d/pritunl-fake-api.conf` for more details. | |
21 | |
22 version: '3.7' | |
23 services: | |
24 web: | |
25 image: trafex/php-nginx | |
26 volumes: | |
27 - "./www:/var/www/html:ro" | |
28 - "./docker/api-only/conf.d/pritunl-fake-api.conf:/etc/nginx/conf.d/pritunl-fake-api.conf" | |
29 ################################################################# | |
30 ### If you run behind Traefik COMMENT OUT the following lines ### | |
31 ### BEGIN TRAEFIK_BLOCK ### | |
32 ports: | |
33 - "80:8080" | |
34 ################################################################# | |
35 | |
36 ################################################################# | |
37 | |
38 ### BEGIN SINGLE_DAEMON_BLOCK ### | |
39 | |
40 ### If you run behind on Docker Single Daemon (NOT Swarm) uncomment the following lines ### | |
41 # networks: | |
42 # - default | |
43 # - proxy_external | |
44 # labels: | |
45 # - "traefik.enable=true" | |
46 # - "traefik.docker.network=proxy_external" | |
47 # - "traefik.tags=proxy_external" | |
48 # ### Services | |
49 # ## API | |
50 # - "traefik.http.services.pritunl-api.loadbalancer.server.port=8080" | |
51 # ### Routers | |
52 # - "traefik.http.routers.pritunl-api.entrypoints=https" | |
53 # - "traefik.http.routers.pritunl-api.rule=Host(`mypritunlfakeapi.example.com`)" | |
54 # - "traefik.http.routers.pritunl-api.service=pritunl-api" | |
55 # - "traefik.http.routers.pritunl-api.tls=true" | |
56 # - "traefik.http.routers.pritunl-api.tls.certresolver=http" | |
57 # networks: | |
58 # proxy_external: | |
59 # external: true | |
60 # name: proxy_external | |
61 | |
62 ### END SINGLE_DAEMON_BLOCK ### | |
63 | |
64 | |
65 ### BEGIN SWARM_BLOCK ### | |
66 | |
67 ### If you run on Docker Swarm uncomment the following lines ### | |
68 # networks: | |
69 # - default | |
70 # - proxy_external | |
71 # labels: | |
72 # - "traefik.enable=true" | |
73 # deploy: | |
74 # labels: | |
75 # - "traefik.enable=true" | |
76 # - "traefik.docker.network=proxy_external" | |
77 # - "traefik.tags=proxy_external" | |
78 # ### Services | |
79 # ## API | |
80 # - "traefik.http.services.pritunl-api.loadbalancer.server.port=8080" | |
81 # ### Routers | |
82 # - "traefik.http.routers.pritunl-api.entrypoints=https" | |
83 # - "traefik.http.routers.pritunl-api.rule=Host(`mypritunlfakeapi.example.com`)" | |
84 # - "traefik.http.routers.pritunl-api.service=pritunl-api" | |
85 # - "traefik.http.routers.pritunl-api.tls=true" | |
86 # - "traefik.http.routers.pritunl-api.tls.certresolver=http" | |
87 # networks: | |
88 # proxy_external: | |
89 # external: true | |
90 # name: proxy_external | |
91 | |
92 ### END SWARM_BLOCK ### | |
93 | |
94 | |
95 | |
96 ### END TRAEFIK BLOCK ### | |
97 ################################################################# | |
98 |