-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (50 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
55 lines (50 loc) · 1.79 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
services:
traefik:
image: traefik:v2.10
container_name: traefik
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/acme.json:/acme.json
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
networks:
- web
labels:
- "traefik.enable=true"
# Traefik Dashboard
- "traefik.http.routers.dashboard.rule=Host(`traefik.fancydictionary.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.tls.certresolver=letsencrypt"
- "traefik.http.routers.dashboard.middlewares=auth"
# Basic Authentication
- "traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$10$$yourhashedpassword"
dictionary-app:
build:
context: .
dockerfile: Dockerfile.prod
args:
REACT_APP_DOMAIN: ${REACT_APP_DOMAIN}
REACT_APP_EMAIL: ${REACT_APP_EMAIL}
REACT_APP_TRAEFIK_PASSWORD_HASH: ${REACT_APP_TRAEFIK_PASSWORD_HASH}
REACT_APP_PROJECT_DIR: ${REACT_APP_PROJECT_DIR}
REACT_APP_ENV: ${REACT_APP_ENV}
REACT_APP_SERVER_URL: ${REACT_APP_SERVER_URL}
NODE_ENV: production
container_name: dictionary-app
restart: unless-stopped
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.dictionary.rule=Host(`fancydictionary.com`)"
- "traefik.http.routers.dictionary.entrypoints=websecure"
- "traefik.http.routers.dictionary.tls.certresolver=letsencrypt"
- "traefik.http.services.dictionary.loadbalancer.server.port=80"
- "traefik.docker.network=web"
networks:
web:
external: true