mirror of https://github.com/writeas/writefreely
Merge pull request #24 from TheJF/add_dockerfile_and_docker-compose
Add Dockerfile and Docker Compose filespull/29/head
commit
6cede306b9
@ -0,0 +1,15 @@ |
||||
FROM golang:1.11.2-alpine3.8 |
||||
|
||||
RUN apk add --update nodejs nodejs-npm make git |
||||
RUN npm install -g less |
||||
RUN npm install -g less-plugin-clean-css |
||||
|
||||
WORKDIR /go/src/app |
||||
COPY . . |
||||
|
||||
RUN make install |
||||
RUN make ui |
||||
RUN make deps |
||||
|
||||
EXPOSE 8080 |
||||
CMD ["writefreely"] |
@ -0,0 +1,30 @@ |
||||
version: "3" |
||||
services: |
||||
web: |
||||
build: . |
||||
volumes: |
||||
- "web-data:/go/src/app" |
||||
ports: |
||||
- "8080:8080" |
||||
networks: |
||||
- writefreely |
||||
depends_on: |
||||
- db |
||||
restart: unless-stopped |
||||
db: |
||||
image: "mariadb:latest" |
||||
volumes: |
||||
- "./schema.sql:/tmp/schema.sql" |
||||
- db-data:/var/lib/mysql/data |
||||
networks: |
||||
- writefreely |
||||
environment: |
||||
- MYSQL_ROOT_PASSWORD=changeme |
||||
restart: unless-stopped |
||||
|
||||
volumes: |
||||
web-data: |
||||
db-data: |
||||
|
||||
networks: |
||||
writefreely: |
Loading…
Reference in new issue