From b1c352cbf88dad1b60ec722182ccf7f2eda657b6 Mon Sep 17 00:00:00 2001 From: "Adrien LSH@42" Date: Mon, 9 Oct 2023 15:22:04 +0200 Subject: [PATCH] docker setup --- docker-compose.yml | 34 ++++++++++++++++++++++++++++++++++ nginx/Dockerfile | 3 +++ nginx/html/index.html | 10 ++++++++++ 3 files changed, 47 insertions(+) create mode 100644 docker-compose.yml create mode 100644 nginx/Dockerfile create mode 100644 nginx/html/index.html diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2ca3c38 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.8' + +name: transcendence + +services: + nginx: + image: nginx + build: ./nginx/ + networks: + - network + ports: + - "8080:80" + depends_on: + - postgres + container_name: nginx + restart: always + + postgres: + image: postgres + networks: + - network + volumes: + - db:/var/lib/postgresql/data + container_name: postgres + restart: always + environment: + - "POSTGRES_PASSWORD=michel" + +volumes: + db: + +networks: + network: + driver: bridge diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..7e7f1ca --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx + +COPY html/ /usr/share/nginx/html diff --git a/nginx/html/index.html b/nginx/html/index.html new file mode 100644 index 0000000..c87692f --- /dev/null +++ b/nginx/html/index.html @@ -0,0 +1,10 @@ + + + + +

My First Heading

+ +

My first paragraph.

+ + +