-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (57 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
58 lines (57 loc) · 1.39 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
networks:
traefik-net:
external: true
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: laravel-app
restart: always
working_dir: /var/www/html
expose:
- "80"
environment:
APP_ENV: local
APP_DEBUG: "true"
APP_URL: http://localhost
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: openhackathon
DB_USERNAME: root
DB_PASSWORD: root
SESSION_DRIVER: database
CACHE_DRIVER: file
QUEUE_DRIVER: database
networks:
- traefik-net
depends_on:
db:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.webapp.rule=Host(`openup.okfn.gr`)" # Change to your domain
- "traefik.http.routers.webapp.entrypoints=websecure"
- "traefik.http.routers.webapp.tls=true"
- "traefik.http.services.webapp.loadbalancer.server.port=80"
db:
image: mysql:8.0
container_name: laravel-db
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: openhackathon
MYSQL_PASSWORD: root
volumes:
- db_data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- traefik-net
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--host=localhost", "--user=root", "--password=root"]
interval: 10s
retries: 5
volumes:
db_data: