-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
47 lines (45 loc) · 1.07 KB
/
docker-compose.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
version: "3.9"
services:
db:
image: mysql/mysql-server:latest
environment:
- MYSQL_ROOT_HOST=%
- MYSQL_ROOT_PASSWORD=password
ports:
- "3306:3306" # Expose port for external access
expose:
- "3306" # Internal access within the Docker network
container_name: antcat-db
volumes:
- ./sql-data:/docker-entrypoint-initdb.d
networks:
- antcat-network
app:
depends_on:
- db
build:
context: .
dockerfile: Dockerfile
environment:
DB_USERNAME: root
DB_PASSWORD: password
DB_DATABASE: antcat
DB_PORT: 3306
DB_HOST: db # Use service name for DNS resolution
NO_DEV_MONKEY_PATCHES: "y"
volumes:
- ..:/app
- ./database.yml:/app/config/database.yml
- ../config/server.yml.example:/app/config/server.yml
ports:
- "8080:8080"
container_name: antcat-app
user: antcat
stdin_open: true
tty: true
command: ["/bin/bash", "-c", "app/startup.sh"]
networks:
- antcat-network
networks:
antcat-network:
driver: bridge