ProjectLighthouse/docker-compose.yml
Josh 263bfb5b23
Containerize Project Lighthouse (#582)
* Add lighthouse docker support

* Update to NET 7.0

* Make docker copy git repository info

* Add restart policy to compose file

* Delete temp folder after copying to data

* Only build the docker image once

* Fix builds from being dirty

* Add su-exec to final image

* Run lighthouse as non root user

* Add compose file to gitignore

* Remove compose file from gitignore

Co-authored-by: Dagg <daggintosh@outlook.com>
2023-01-04 19:26:49 -06:00

90 lines
2.1 KiB
YAML

version: '3'
volumes:
database:
redis:
services:
gameserver:
image: lighthouse:latest
container_name: gameserver
build: .
restart: unless-stopped
ports:
- "10061:10061"
environment:
SERVER: GameServer
healthcheck:
test: wget --spider -t1 -nv http://localhost:10061/LITTLEBIGPLANETPS3_XML/status || exit 1
timeout: 10s
retries: 5
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- "./data:/lighthouse/data:z"
website:
image: lighthouse:latest
container_name: website
restart: unless-stopped
ports:
- "10060:10060"
environment:
SERVER: Website
healthcheck:
test: wget --spider -t1 -nv http://localhost:10060/status || exit 1
timeout: 10s
retries: 5
depends_on:
db:
condition: service_started
redis:
condition: service_started
gameserver:
condition: service_healthy
volumes:
- "./data:/lighthouse/data:z"
api:
image: lighthouse:latest
container_name: api
restart: unless-stopped
ports:
- "10062:10062"
environment:
SERVER: API
healthcheck:
test: wget --spider -t1 -nv http://localhost:10062/api/v1/status || exit 1
timeout: 10s
retries: 5
depends_on:
db:
condition: service_started
redis:
condition: service_started
gameserver:
condition: service_healthy
volumes:
- "./data:/lighthouse/data:z"
db:
image: mariadb
container_name: db
restart: unless-stopped
ports:
- "3306:3306"
environment:
MARIADB_ROOT_PASSWORD: lighthouse
MARIADB_DATABASE: lighthouse
healthcheck:
test: "/usr/bin/mysql --user=root --password=lighthouse --execute \"SHOW DATABASES;\""
timeout: 20s
retries: 10
volumes:
- "database:/var/lib/mysql"
redis:
image: redis/redis-stack-server
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- "redis:/var/lib/redis"