HovedprosjektWebApp/docker-compose.example.yml

50 lines
1002 B
YAML

version: '3.7'
services:
app:
build:
args:
user: hovedprosjekt
uid: 1000
context: ./.docker
dockerfile: Dockerfile
image: hovedprosjekt
container_name: hovedprosjekt-app
restart: unless-stopped
working_dir: /var/www/
volumes:
- ./:/var/www
networks:
- hovedprosjekt
db:
image: postgres:12.2-alpine
container_name: hovedprosjekt-db
restart: unless-stopped
environment:
POSTGRES_PASSWORD: FLOT_Hovedprosjekt
POSTGRES_USER: hovedprosjekt
POSTGRES_DB: hovedprosjekt
volumes:
- /srv/flot_pgdata:/var/lib/postgresql/data
networks:
- hovedprosjekt
nginx:
image: nginx:1.17
container_name: hovedprosjekt-nginx
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./:/var/www
- ./.docker/nginx/:/etc/nginx/conf.d/
- /srv/ssl:/srv/ssl
networks:
- hovedprosjekt
networks:
hovedprosjekt:
driver: bridge