Commit 85933f2c authored by David Haynes's avatar David Haynes 🙆

Merge branch '154-docker-revision' into '2.3-dev'

Resolve "Revise docker implementation"

See merge request !108
parents 33cfc11b caf7edca
Pipeline #1621 passed with stages
in 2 minutes and 31 seconds
# Build on top of the python image and install any external packages
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN apt-get update
RUN apt-get install netcat -y
RUN mkdir /go
WORKDIR /go
ADD /requirements/ /go/
RUN pip install -r base.txt
# Set enviornment variables
ENV PYTHONUNBUFFERED 1
# Copy over all project files into /go/
RUN mkdir /go/
WORKDIR /go/
ADD . /go/
# Install pip dependecies
RUN pip install -r /go/requirements/dev.txt
......@@ -71,7 +71,6 @@ Windows Subsystem for Linux (WSL). The following link should get you up and runn
[https://msdn.microsoft.com/en-us/commandline/wsl/install_guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
#### Contributing with Windows
After that is setup, you should be able to follow the Linux instructions for _manual setup_ to
......@@ -83,7 +82,7 @@ Windows here:
[https://git-scm.com/download/win](https://git-scm.com/download/win)
I have successfully ran the project with Docker, though you need access to
Hyper-V which is only available on "Professional" versions of Windows.
Hyper-V which is only available on "Professional" versions of Windows.
## 2) Clone the Go codebase.
......@@ -113,7 +112,7 @@ language.
Instead of running a full VM that runs Go, we package up all the
various bits that make up Go and run that as a container (two
containers: one for Go and the other for mysql) that act as normal
processes to the OS.
processes to the OS.
Check out [docker.com](https://www.docker.com/what-docker) for more details.
......@@ -133,12 +132,6 @@ Pros:
- Can easily destroy and rebuild the docker images
- Loads in changes to code on the fly
Cons:
- Challenging to debug problems
- Cannot interact with attached images and as a result, you cannot really
interact with the database.
There are instructions on how to setup/develop with Docker at the [docker-configuration page in the Go project wiki](https://git.gmu.edu/srct/go/wikis/docker-configuration).
### Manual Setup
......@@ -207,9 +200,9 @@ use the same username and Full Name as your main account and select "approved" i
## Coding style
You should adhere to the style of the repo code. Consistancy is key! PEP8 guidelines
are strongly reccomended but not enforced at the time. Please comment your code,
I will not accept commits that contain uncommented code.
You should adhere to the style of the repo code. Consistency is key! PEP8 guidelines
are strongly recommended but not enforced at the time. Please comment your code,
I will not accept commits that contain undocumented code.
## Getting Help
......
version: '2'
version: "3"
services:
db:
image: mysql
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- gonet
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: go
MYSQL_USER: go
MYSQL_PASSWORD: go
web:
build: .
restart: always
image: go_web
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- gonet
ports:
- '8000:8000'
command: /bin/bash ./startup.sh -python go/manage.py runserver 0.0.0.0:8000
......@@ -27,10 +48,5 @@ services:
- GO_EMAIL_TO=
- superuser=dhaynes3
db:
image: mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: go
MYSQL_USER: go
MYSQL_PASSWORD: go
networks:
gonet:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment