-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
48 lines (46 loc) · 1.23 KB
/
compose.yml
File metadata and controls
48 lines (46 loc) · 1.23 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
services:
db:
image: mariadb
restart: unless-stopped
ports:
- "3306:3306"
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_USER: ${MARIADB_USER}
MARIADB_DATABASE: ${MARIADB_DATABASE}
volumes:
- ./backup-volume:/backup
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
networks:
database:
ipv4_address: 172.18.0.2 # Assign a hidden IP address within the network
diesel-cli:
build:
context: . # Use the current directory as the build context
dockerfile: Dockerfile.diesel
environment:
DATABASE_URL: ${DATABASE_URL}
volumes:
- .:/volume
working_dir: /volume
command: diesel migration run
stdin_open: true # Equivalent to -it (interactive terminal)
tty: true # Allocate a pseudo-TTY
restart: "no" # Equivalent to --rm to prevent container from restarting
networks:
- database
depends_on:
db:
condition: service_healthy
networks:
database:
driver: bridge
ipam:
config:
- subnet: 172.18.0.0/16