-
Notifications
You must be signed in to change notification settings - Fork 1
/
staging.yml
95 lines (92 loc) · 2.99 KB
/
staging.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
89
90
91
92
93
94
95
version: '3.7'
services:
web:
build: .
container_name: tc-api-container
image: tc-api-image
command: /srv/start
volumes:
- .:/code
- ../taicol-volumes/static:/code/conf/static
# - ../taicol-volumes/data:/code/data
# expose:
# - 8002
ports:
- 8002:8002
# tty: true
# stdin_open: true
env_file:
- .env
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.whoami.rule=Host(`api-staging.taicol.tw`)"
# - "traefik.http.routers.whoami.entrypoints=websecure"
# - "traefik.http.routers.whoami.tls.certresolver=myresolver"
# nginx:
# image: nginx
# restart: always
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./scripts/nginx-django.conf:/etc/nginx/conf.d/nginx-django.conf
# # - ./taicol-volumes/logs/nginx:/var/log/nginx
# - ../taicol-volumes/static:/code/conf/static
# # - ../taicol-volumes/certbot/conf:/etc/letsencrypt
# # - ../taicol-volumes/certbot/www:/var/www/certbot
# links:
# - web:web
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done &
# nginx -g \"daemon off;\"'"
# mysql:
# build: ./scripts/mysql
# container_name: tc-api-mysql-container
# ports:
# - "3307:3306"
# image: tc-api-mysql-image
# restart: always
# environment:
# MYSQL_ALLOW_EMPTY_PASSWORD: "true"
# # env_file:
# # - ./app/.env
# volumes:
# - ../taicol-volumes/mysql:/var/lib/mysql:rw
# - ../taicol-volumes/bucket:/bucket
# command:
# [
# "mysqld",
# "--character-set-server=utf8mb4",
# "--collation-server=utf8mb4_unicode_ci",
# ]
# traefik:
# image: "traefik:v2.10"
# container_name: "traefik"
# command:
# #- "--log.level=DEBUG"
# - "--api.insecure=true"
# - "--providers.docker=true"
# - "--providers.docker.exposedbydefault=false"
# - "--entrypoints.websecure.address=:443"
# - "--certificatesresolvers.myresolver.acme.tlschallenge=true"
# #- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
# - "--certificatesresolvers.myresolver.acme.email=catalogueoflife.taiwan@gmail.com"
# - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
# ports:
# - "443:443"
# # - "8080:8080"
# volumes:
# - "./letsencrypt:/letsencrypt"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
# whoami:
# image: "traefik/whoami"
# container_name: "simple-service"
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.whoami.rule=Host(`api-staging.taicol.tw`)"
# - "traefik.http.routers.whoami.entrypoints=websecure"
# - "traefik.http.routers.whoami.tls.certresolver=myresolver"
# certbot:
# image: certbot/certbot
# volumes:
# - ../taicol-volumes/certbot/conf:/etc/letsencrypt
# - ../taicol-volumes/certbot/www:/var/www/certbot