Moved docker files to contrib, added documentation

main
Igor Scheller 6 years ago committed by msquare
parent d7ba51b3ec
commit 8ed3ed3a77

@ -1,2 +0,0 @@
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf

@ -82,6 +82,19 @@ PRODUCTION_REMOTE # Same as STAGING_REMOTE but for the production environm
PRODUCTION_REMOTE_PATH # Same as STAGING_REMOTE_PATH but for the production environment PRODUCTION_REMOTE_PATH # Same as STAGING_REMOTE_PATH but for the production environment
``` ```
### Docker container
To build the `engelsystem` and the `engelsystem-nginx` container:
```bash
cd contrib
docker-compose build
```
or to build the containers separately
```bash
docker build -f contrib/Dockerfile . -t engelsystem
docker build -f contrib/nginx/Dockerfile . -t engelsystem-nginx
```
#### deploy.sh #### deploy.sh
The `deploy.sh` script can be used to deploy the engelsystem. It uses rsync to deploy the application to a server over ssh. The `deploy.sh` script can be used to deploy the engelsystem. It uses rsync to deploy the application to a server over ssh.

@ -1,23 +1,31 @@
version: "3.3" version: "3.6"
services: services:
nginx: nginx:
image: engelsystem-nginx
build: build:
context: . context: ..
dockerfile: Dockerfile-proxy dockerfile: contrib/nginx/Dockerfile
ports: ports:
- 5000:80 - 5000:80
volumes: volumes:
- static:/var/www/html - static:/var/www/html
depends_on:
- engelsystem
engelsystem: engelsystem:
build: ./ image: engelsystem
build:
context: ..
dockerfile: contrib/Dockerfile
environment: environment:
MYSQL_HOST: db MYSQL_HOST: database
MYSQL_USER: engelsystem MYSQL_USER: engelsystem
MYSQL_PASSWORD: engelsystem MYSQL_PASSWORD: engelsystem
MYSQL_DATABASE: engelsystem MYSQL_DATABASE: engelsystem
volumes: volumes:
- static:/var/www/html - static:/var/www/html
db: depends_on:
- database
database:
image: mariadb:latest image: mariadb:latest
environment: environment:
MYSQL_DATABASE: engelsystem MYSQL_DATABASE: engelsystem
@ -33,5 +41,5 @@ services:
# ports: # ports:
# - 8080:8080 # - 8080:8080
volumes: volumes:
db: {} db: {}
static: {} static: {}

@ -0,0 +1,2 @@
FROM nginx:alpine
COPY contrib/nginx/nginx.conf /etc/nginx/nginx.conf
Loading…
Cancel
Save