Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/DevopsCourse2024
Submodule DevopsCourse2024 added at b2dbd0
52 changes: 52 additions & 0 deletions src/app/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '2'

# Note: use the database service name `db` in the Host IP Address field ...
# Or, `docker container inspect {postgrescontainerid}` to obtain the IP Address needed for completing the Drupal setup screen.

services:
# Postgres
db:
image: postgres:9.6.5-alpine
restart: always
networks:
drupal:
ipv4_address: 192.168.92.43
environment:
POSTGRES_DB: drupaldb
POSTGRES_USER: drupaluser
POSTGRES_PASSWORD: drupalpassword
volumes:
- db_data:/var/lib/postgresql/data
ports:
- 5432:5432

# Drupal
cms:
image: drupal:8.3.7-apache
restart: always
networks:
drupal:
ipv4_address: 192.168.92.21
ports:
- 8080:80
volumes:
- cms_modules:/var/www/html/modules
- cms_profiles:/var/www/html/profiles
- cms_themes:/var/www/html/themes
- cms_sites:/var/www/html/sites
depends_on:
- db
networks:
drupal:
ipam:
driver: default
config:
- subnet: "192.168.92.0/24"

# Volumes
volumes:
db_data:
cms_modules:
cms_profiles:
cms_themes:
cms_sites:
15 changes: 15 additions & 0 deletions src/app/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.8.2
ENV FLASK_APP=flaskr

ENV FLASK_ENV=development
WORKDIR /usr/src/app
COPY ./DevopsCourse2024 .
RUN pip install --upgrade pip

RUN pip install --editable .
RUN flask init-db
COPY . .


EXPOSE 5000
CMD ["flask", "run", "--host=0.0.0.0"]