-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
42 lines (36 loc) · 1.07 KB
/
docker-compose.yaml
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
version: "3.8"
services:
database:
image: mariadb
restart: always
ports:
- "3308:3306"
volumes:
- ./migrations/chatbdd.sql:/docker-entrypoint-initdb.d/migration.sql
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-password}
MARIADB_DATABASE: ${MARIADB_DATABASE:-chatbdd}
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$MARIADB_ROOT_PASSWORD" ]
interval: 5s
timeout: 5s
retries: 5
go-web:
build:
context: .
dockerfile: Dockerfile
container_name: go-api
restart: always
tty: true
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-password}
MARIADB_DATABASE: ${MARIADB_DATABASE:-chatbdd}
ports:
- "8000:8000"
volumes:
- ./gorillachat:/gorillachat
adminer:
image: adminer
restart: always
ports:
- "8082:8080"