docker-compose dev env
This commit is contained in:
parent
e976c27c2e
commit
c1fa61acaf
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
# Stage 1 testing
|
||||
FROM node:14.7.0-alpine as builder
|
||||
|
||||
COPY . /data
|
||||
|
||||
# build
|
||||
RUN cd /data &&\
|
||||
npm ci &&\
|
||||
npm test &&\
|
||||
npm run jshint_backend
|
||||
|
||||
# Stage 2 package
|
||||
FROM node:14.7.0-alpine
|
||||
|
||||
COPY . /data
|
||||
|
||||
RUN cd /data && npm ci --only=production
|
||||
COPY --from=builder /data/public /data/public
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["npm", "start"]
|
4
dev/data/minetest/world/.gitignore
vendored
Normal file
4
dev/data/minetest/world/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
env_meta.txt
|
||||
force_loaded.txt
|
||||
ipban.txt
|
||||
map_meta.txt
|
10
dev/data/minetest/world/world.mt
Normal file
10
dev/data/minetest/world/world.mt
Normal file
@ -0,0 +1,10 @@
|
||||
gameid = minetest
|
||||
creative_mode = false
|
||||
enable_damage = true
|
||||
|
||||
pgsql_connection = host=postgres port=5432 user=postgres password=enter dbname=postgres
|
||||
pgsql_player_connection = host=postgres port=5432 user=postgres password=enter dbname=postgres
|
||||
|
||||
auth_backend = sqlite3
|
||||
player_backend = postgresql
|
||||
backend = postgresql
|
34
dev/docker-compose.yml
Normal file
34
dev/docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
minetest:
|
||||
image: buckaroobanzay/minetest:5.3.0-r5
|
||||
ports:
|
||||
- "30000:30000/udp"
|
||||
depends_on:
|
||||
- "postgres"
|
||||
volumes:
|
||||
- "./data/minetest:/data"
|
||||
# - "./data/minetest/debug.txt:/root/.minetest/debug.txt"
|
||||
working_dir: /data
|
||||
command: minetestserver --config /data/minetest.conf --world /data/world/ --quiet
|
||||
|
||||
postgres:
|
||||
image: postgres:12.4
|
||||
environment:
|
||||
POSTGRES_PASSWORD: enter
|
||||
volumes:
|
||||
- "postgres-data:/var/lib/postgresql/data"
|
||||
|
||||
mapcleaner:
|
||||
build: ..
|
||||
environment:
|
||||
PGHOST: postgres
|
||||
PGUSER: postgres
|
||||
PGDATABASE: postgres
|
||||
PGPASSWORD: enter
|
||||
PGPORT: 5432
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
postgres-data: {}
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker run --rm -it \
|
||||
-u root:root \
|
||||
-v $(pwd)/minetest.conf:/data/minetest.conf \
|
||||
-v $(pwd)/world.mt:/data/world/world.mt \
|
||||
-v $(pwd)/worldmods:/data/world/worldmods \
|
||||
--network host \
|
||||
buckaroobanzay/minetest:5.2.0-r1
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# setup
|
||||
docker run --name mapcleaner_db --rm \
|
||||
-e POSTGRES_PASSWORD=enter \
|
||||
-p 5432:5432 \
|
||||
postgres
|
@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
docker exec -it mapcleaner_db psql -U postgres
|
||||
docker-compose exec postgres psql -U postgres
|
||||
|
10
dev/world.mt
10
dev/world.mt
@ -1,10 +0,0 @@
|
||||
gameid = minetest
|
||||
creative_mode = false
|
||||
enable_damage = true
|
||||
|
||||
pgsql_connection = host=127.0.0.1 port=5432 user=postgres password=enter dbname=postgres
|
||||
pgsql_player_connection = host=127.0.0.1 port=5432 user=postgres password=enter dbname=postgres
|
||||
|
||||
auth_backend = sqlite3
|
||||
player_backend = postgresql
|
||||
backend = postgresql
|
Loading…
x
Reference in New Issue
Block a user