Files
linux-odyssey/docker-compose.yml
T
wancat 189c87df5a build: setup Docker dev configuration
- Add `.dockerignore` file
- Add `Dockerfile.dev`
- Modify `docker-compose.yml`:
  - Add `restart: on-failure` to `app` service
  - Modify `build` section of `app` service
  - Remove `links` section from `app` service
  - Add `networks` section to `app` and `db` services
  - Add `networks` section to the end of the file

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-25 15:37:05 +08:00

34 lines
642 B
YAML

version: '3'
services:
app:
image: lancatlin/linux-odyssey
restart: on-failure
build:
context: .
dockerfile: Dockerfile.dev
networks:
- internal
- players
ports:
- '3000:3000'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./server:/app/server
environment:
- MONGO_URL=mongodb://db:27017/odyssey-test
- DOCKER_NETWORK=linux-odyssey-players
db:
image: mongo
restart: always
networks:
- internal
ports:
- '27017:27017'
volumes:
- ./data:/data/db
networks:
internal:
players:
name: linux-odyssey-players