39 lines
666 B
YAML
39 lines
666 B
YAML
version: "3.9"
|
|
name: apt_stream
|
|
|
|
volumes:
|
|
# Config
|
|
config:
|
|
|
|
services:
|
|
# Mongo server
|
|
mongo_server:
|
|
image: mongo
|
|
container_name: mongo_server_apt_stream
|
|
restart: always
|
|
|
|
# Apt server
|
|
apt_stream:
|
|
build: "./"
|
|
container_name: apt_stream
|
|
# Restart if the container fails
|
|
restart: on-failure
|
|
|
|
# Wait for mongo server to be ready
|
|
depends_on:
|
|
- mongo_server
|
|
|
|
# Mount volumes
|
|
volumes:
|
|
- config:/data
|
|
|
|
# Set extra config to "apt-stream server"
|
|
command:
|
|
- "--db"
|
|
- "mongo_server"
|
|
- "--port"
|
|
- "3000"
|
|
|
|
# Expose port
|
|
ports:
|
|
- "3000:3000/tcp" |