Add docker-compose support (#545)
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
# Docker support, thanks to xinyifly
|
# Docker support, thanks to xinyifly
|
||||||
|
|
||||||
FROM openjdk:7-alpine
|
FROM openjdk:8u171-jdk-alpine
|
||||||
RUN apk -U add tini
|
RUN apk -U add tini
|
||||||
WORKDIR /mnt
|
WORKDIR /mnt
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
RUN sh ./posix-compile.sh
|
RUN sh ./posix-compile.sh
|
||||||
|
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait
|
||||||
|
RUN chmod +x /wait
|
||||||
|
|
||||||
EXPOSE 8484 7575 7576 7577
|
EXPOSE 8484 7575 7576 7577
|
||||||
CMD exec tini -- sh ./posix-launch.sh
|
ENTRYPOINT ["tini", "--"]
|
||||||
|
CMD /wait && sh ./posix-launch.sh
|
||||||
|
|||||||
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
maplestory:
|
||||||
|
network_mode: "host"
|
||||||
|
build: .
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
environment:
|
||||||
|
WAIT_HOSTS: localhost:3306
|
||||||
|
|
||||||
|
db:
|
||||||
|
network_mode: "host"
|
||||||
|
image: mysql:5.6
|
||||||
|
environment:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
||||||
|
MYSQL_DATABASE: "heavenms"
|
||||||
|
MYSQL_USER: "root"
|
||||||
|
MYSQL_PASSWORD: ""
|
||||||
|
volumes:
|
||||||
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
Reference in New Issue
Block a user