Skip to content

Commit dacb5d1

Browse files
committed
Build a Compose File for a Multi-Container Service
1 parent cf04b1a commit dacb5d1

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

compose-assignment-2/Dockerfile

+14-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
# create your custom drupal image here, based of official drupal
1+
# create your custom drupal image here, based of official drupal
2+
FROM drupal:8.8.2
3+
4+
5+
RUN apt-get update && apt-get install -y git \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
WORKDIR /var/www/html/themes
9+
10+
RUN git clone --branch 8.x-3.x --single-branch --depth 1 https://git.drupalcode.org/project/bootstrap.git \
11+
&& chown -R www-data:www-data bootstrap
12+
13+
WORKDIR /var/www/html
14+
+30
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
# create your drupal and postgres config here, based off the last assignment
2+
version: '2'
3+
# NOTE: move this answer file up a directory so it'll work
4+
5+
services:
6+
7+
drupal:
8+
image: custom-drupal
9+
build: .
10+
ports:
11+
- "8081:80"
12+
volumes:
13+
- drupal-modules:/var/www/html/modules
14+
- drupal-profiles:/var/www/html/profiles
15+
- drupal-sites:/var/www/html/sites
16+
- drupal-themes:/var/www/html/themes
17+
18+
postgres:
19+
image: postgres:12.1
20+
environment:
21+
- POSTGRES_PASSWORD=mypasswd
22+
volumes:
23+
- drupal-data:/var/lib/postgresql/data
24+
25+
volumes:
26+
drupal-data:
27+
drupal-modules:
28+
drupal-profiles:
29+
drupal-sites:
30+
drupal-themes:
31+

0 commit comments

Comments
 (0)