Skip to content
Snippets Groups Projects
Commit d896d94e authored by Simon Künzel's avatar Simon Künzel
Browse files

Add network to docker compose

parent cfe2643d
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ services: ...@@ -5,6 +5,8 @@ services:
dockerfile: .dockerfiles/api dockerfile: .dockerfiles/api
ports: ports:
- 5000:5000 - 5000:5000
networks:
- videoag_backend
extra_hosts: extra_hosts:
host.docker.internal: host-gateway host.docker.internal: host-gateway
environment: environment:
...@@ -20,6 +22,8 @@ services: ...@@ -20,6 +22,8 @@ services:
build: build:
context: . context: .
dockerfile: .dockerfiles/api dockerfile: .dockerfiles/api
networks:
- videoag_backend
extra_hosts: extra_hosts:
host.docker.internal: host-gateway host.docker.internal: host-gateway
environment: environment:
...@@ -38,6 +42,8 @@ services: ...@@ -38,6 +42,8 @@ services:
- POSTGRES_PASSWORD=videoag - POSTGRES_PASSWORD=videoag
ports: ports:
- "5432:5432" - "5432:5432"
networks:
- videoag_backend
volumes: volumes:
- db-data:/var/lib/postgresql/data - db-data:/var/lib/postgresql/data
healthcheck: healthcheck:
...@@ -48,3 +54,6 @@ services: ...@@ -48,3 +54,6 @@ services:
volumes: volumes:
db-data: db-data:
networks:
videoag_backend:
\ No newline at end of file
...@@ -53,6 +53,8 @@ class DockerJob(JobExecutionInfo): ...@@ -53,6 +53,8 @@ class DockerJob(JobExecutionInfo):
run_args = [ run_args = [
"docker", "run", "docker", "run",
# docker-compose networks are prefixed with the directories' name
"--network", "backend_videoag_backend",
"--add-host", "host.docker.internal:host-gateway", "--add-host", "host.docker.internal:host-gateway",
] ]
if self._metadata.mount_common_config: if self._metadata.mount_common_config:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment