Skip to content

Adding Docker support #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '2'

services:

app:
build: docker/app
environment:
- VIRTUAL_HOST=communote.de
- VIRTUAL_PORT=8080
networks:
- communote
- public
depends_on:
- db

db:
image: postgres:9.1.23
expose:
- 3306
volumes:
- ./docker/pgsql/data:/var/lib/mysql:rw
environment:
- POSTGRES_PASSWORD=1234
- POSTGRES_DB=communote
networks:
- communote

networks:
communote:
driver: bridge
public:
external:
name: public
Binary file added docker/app/Communote-3.4.0.7b5d-linux.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM tomcat

ADD Communote-3.4.0.7b5d-linux.tar.gz /
RUN mv /Communote-3.4.0.7b5d /app
ADD context.xml /app/communote/conf/context.xml
RUN mkdir /communote-data
ADD startup.properties /app/communote/conf/communote/

ENV CATALINA_HOME=/app/communote/

CMD /app/communote/bin/startup.sh && /bin/bash -c "sleep inf"
10 changes: 10 additions & 0 deletions docker/app/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<Context privileged="true" useHttpOnly="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname="" />

<Environment name="communote.instance.name" type="java.lang.String" value="communote" />
<Environment name="communote.config.dir" type="java.lang.String" value="/app/communote/conf/communote" />
</Context>
1 change: 1 addition & 0 deletions docker/app/startup.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
communote.data.dir=/communote-data