-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
55 lines (50 loc) · 1.21 KB
/
docker-compose.prod.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
version: '3.7'
services:
api_mysql:
image: jaljo/blog_api:api_mysql-${IMAGE_TAG}
build:
context: .
dockerfile: .docker/mysql/Dockerfile
restart: on-failure
environment:
- MYSQL_USER=root
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
networks:
- internal
api_nginx:
image: jaljo/blog_api:api_nginx-${IMAGE_TAG}
build:
context: .
dockerfile: .docker/nginx/Dockerfile
restart: on-failure
depends_on:
- api_php
labels:
- "traefik.enable=true"
- "traefik.http.routers.api_nginx.rule=Host(`api.jlanglois.fr`)"
- "traefik.http.routers.api_nginx.entrypoints=web"
- "traefik.http.routers.api_nginx.entrypoints=websecure"
- "traefik.http.routers.api_nginx.tls.certresolver=jlanglois"
- "traefik.docker.network=traefik"
networks:
- traefik
- internal
api_php:
image: jaljo/blog_api:api_php-${IMAGE_TAG}
build:
context: .
dockerfile: .docker/php/Dockerfile
target: php
restart: on-failure
env_file:
- .env
user: 1000:1000
networks:
- internal
networks:
traefik:
external:
name: traefik
internal:
driver: bridge