first try
This commit is contained in:
39
compose.yaml
Normal file
39
compose.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
services:
|
||||
db:
|
||||
image: mariadb
|
||||
container_name: wagfarm-db
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||
MYSQL_USER: ${DB_USER}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
MYSQL_DATABASE: ${DB_DATABASE}
|
||||
volumes:
|
||||
- ./data/mysql:/var/lib/mysql
|
||||
# - ./postgres-init:/docker-entrypoint-initdb.d # SQL scripts
|
||||
networks:
|
||||
- wagfarm-net
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
api:
|
||||
build: ./wagfarm-api
|
||||
container_name: wagfarm-api
|
||||
environment:
|
||||
- DB_HOST=${DB_HOST}
|
||||
- DB_PORT=${DB_PORT}
|
||||
- DB_USER=${DB_USER}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- DB_NAME=${DB_DATABASE}
|
||||
ports:
|
||||
- "8089:8080"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- wagfarm-net
|
||||
|
||||
networks:
|
||||
wagfarm-net:
|
||||
Reference in New Issue
Block a user